------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\mbeissin\Desktop\Stata files for book\Logfiles\chapter8.log
  log type:  text
 opened on:  25 Jan 2022, 22:20:14

. * ============================================================================
. * STATISTICAL RESULTS APPEARING IN CHAPTER 8
. * STATA Do file for Chapter 8  
. * Results reported in Chapter 8  
. * Author: Mark R. Beissinger  
. * Date:  January 2022  
. * Princeton, NJ 
. * =============================================================================
. * BEFORE RUNNING, YOU MUST SET THE DEFAULT PATH FOR WHERE THE DATA
. *   FILES RESIDE
. * =============================================================================
. * Before running, you must download the following package for STATA for running 
. *    Brant command, from spost13_ado from https://jslsoc.sitehost.iu.edu/statatests
. *    switchcopula from http://www.stata-journal.com/software/sj13-3
. * =============================================================================
. * The following datafiles are used in this chapter:
. *   Data set of revolutionary episodes--revolutionaryeps.dta
. * =============================================================================
. * Output produced:  Logfiles\chapter8.log
. * =============================================================================
. 
. * =============================================================
. * LEVELS OF VIOLENCE IN SOCIAL VS. OTHER REVOLUTIONARY EPISODES
. * =============================================================
. clear

. use revolutionaryeps.dta

. ttest totaldeaths if startyear>1899, by(leftist)

Two-sample t test with equal variances
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
      no |     250    55943.27    13214.04    208932.3    29917.73    81968.81
     yes |      75    155206.2    56824.23    492112.3    41981.46      268431
---------+--------------------------------------------------------------------
combined |     325     78850.1    16697.66    301021.3    46000.59    111699.6
---------+--------------------------------------------------------------------
    diff |           -99262.94    39306.46               -176591.9   -21933.95
------------------------------------------------------------------------------
    diff = mean(no) - mean(yes)                                   t =  -2.5254
Ho: diff = 0                                     degrees of freedom =      323

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0060         Pr(|T| > |t|) = 0.0120          Pr(T > t) = 0.9940

. centile totaldeaths if startyear>1899 & success==1 & leftist==1, centile(60)

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
 totaldeaths |        22         60       48000         12056.1    656414.3

. sum totaldeaths if startyear>1899 & success==1 & leftist==1, detail

                   Total deaths in episode
-------------------------------------------------------------
      Percentiles      Smallest
 1%            4              4
 5%            5              5
10%          600            600       Obs                  22
25%         2096            600       Sum of Wgt.          22

50%        25500                      Mean           375141.3
                        Largest       Std. Dev.      771004.5
75%       250000         790000
90%      1000000        1000000       Variance       5.94e+11
95%      2100000        2100000       Skewness       2.429031
99%      3000000        3000000       Kurtosis       8.013901

. 
. * Median levels of violence in other revolutions, by success
. sum totaldeaths if startyear>1899 & success==0 & leftist==0, detail

                   Total deaths in episode
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            1              0
10%           11              0       Obs                 149
25%          163              0       Sum of Wgt.         149

50%         3000                      Mean           46467.36
                        Largest       Std. Dev.      198258.6
75%        20218         420000
90%        90000         500000       Variance       3.93e+10
95%       176667         500000       Skewness       9.537795
99%       500000        2250000       Kurtosis       104.2947

. sum totaldeaths if startyear>1899 & success==1 & leftist==0, detail

                   Total deaths in episode
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            0              0
10%            1              0       Obs                 101
25%           10              0       Sum of Wgt.         101

50%          103                      Mean           69922.59
                        Largest       Std. Dev.      224032.4
75%         2629         766667
90%       200000         815000       Variance       5.02e+10
95%       370000        1023333       Skewness       4.295655
99%      1023333        1500000       Kurtosis       22.89967

. * All revolutionary episodes
. tab deathscat success if startyear>1899, col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

                   | Succeeded in gaining
                   |        power?
   Deaths category |        no        yes |     Total
-------------------+----------------------+----------
              <=10 |        16         29 |        45 
                   |      7.92      23.58 |     13.85 
-------------------+----------------------+----------
     >10 and <=100 |        22         23 |        45 
                   |     10.89      18.70 |     13.85 
-------------------+----------------------+----------
   >100 and <=1000 |        32         16 |        48 
                   |     15.84      13.01 |     14.77 
-------------------+----------------------+----------
>1000 and <= 10000 |        60         18 |        78 
                   |     29.70      14.63 |     24.00 
-------------------+----------------------+----------
>10000 and <=50000 |        34         13 |        47 
                   |     16.83      10.57 |     14.46 
-------------------+----------------------+----------
            >50000 |        38         24 |        62 
                   |     18.81      19.51 |     19.08 
-------------------+----------------------+----------
             Total |       202        123 |       325 
                   |    100.00     100.00 |    100.00 


. 
. * ================================================
. * TABLE 8.1, DEATH CATEGORIES ACROSS TIME PERIODS
. * ================================================
. tab deathscat timeperiod, col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

                   |           Time period
   Deaths category | 1900-1949  1950-1984  1985-2014 |     Total
-------------------+---------------------------------+----------
              <=10 |         7          7         31 |        45 
                   |      6.31       7.69      25.20 |     13.85 
-------------------+---------------------------------+----------
     >10 and <=100 |        16          9         20 |        45 
                   |     14.41       9.89      16.26 |     13.85 
-------------------+---------------------------------+----------
   >100 and <=1000 |        18         11         19 |        48 
                   |     16.22      12.09      15.45 |     14.77 
-------------------+---------------------------------+----------
>1000 and <= 10000 |        32         19         27 |        78 
                   |     28.83      20.88      21.95 |     24.00 
-------------------+---------------------------------+----------
>10000 and <=50000 |        16         20         11 |        47 
                   |     14.41      21.98       8.94 |     14.46 
-------------------+---------------------------------+----------
            >50000 |        22         25         15 |        62 
                   |     19.82      27.47      12.20 |     19.08 
-------------------+---------------------------------+----------
             Total |       111         91        123 |       325 
                   |    100.00     100.00     100.00 |    100.00 


. 
. * =====================================================
. * TOTAL DEATHS IN REVOLUTIONARY EPISODES BY TIME PERIOD
. * =====================================================
. table timeperiods if startyear>1899, c(sum totaldeaths) format(%13.0f)

-------------------------
Time      |
period    | sum(totald~s)
----------+--------------
1900-1949 |      12067089
1950-1984 |      10725404
1985-2014 |       2833791
-------------------------

. * Calculate difference, prorating Cold War deaths by number of years (35) compared to post-Cold War (30)
. 
. * ====================================
. * DURATION OF EPISODES WITH CIVIL WARS
. * ====================================
. sum monthsduration if civilwar==1 & startyear>1899, detail

                   Months duration (total)
-------------------------------------------------------------
      Percentiles      Smallest
 1%            3              3
 5%            4              3
10%            7              3       Obs                 174
25%           24              3       Sum of Wgt.         174

50%         53.5                      Mean           109.5632
                        Largest       Std. Dev.      129.2996
75%          151            480
90%          300            550       Variance        16718.4
95%          410            613       Skewness       1.836509
99%          613            644       Kurtosis        6.20942

. 
. * =================================================================
. * RESPONSIBILITY OF CIVIL WARS FOR DEATHS IN REVOLUTIONARY EPISODES
. * =================================================================
. table civilwar if startyear>1899, c(sum totaldeaths)

-------------------------
Revolutio |
n         |
involved  |
civil     |
war?      |
(sustaine |
d warfare |
> 2 mos)  | sum(totald~s)
----------+--------------
       no |        301111
      yes |      2.53e+07
-------------------------

. tab deathscat civilwar if startyear>1899, col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

                   |  Revolution involved
                   | civil war? (sustained
                   |   warfare > 2 mos)
   Deaths category |        no        yes |     Total
-------------------+----------------------+----------
              <=10 |        45          0 |        45 
                   |     27.61       0.00 |     13.85 
-------------------+----------------------+----------
     >10 and <=100 |        44          1 |        45 
                   |     26.99       0.62 |     13.85 
-------------------+----------------------+----------
   >100 and <=1000 |        36         12 |        48 
                   |     22.09       7.41 |     14.77 
-------------------+----------------------+----------
>1000 and <= 10000 |        31         47 |        78 
                   |     19.02      29.01 |     24.00 
-------------------+----------------------+----------
>10000 and <=50000 |         6         41 |        47 
                   |      3.68      25.31 |     14.46 
-------------------+----------------------+----------
            >50000 |         1         61 |        62 
                   |      0.61      37.65 |     19.08 
-------------------+----------------------+----------
             Total |       163        162 |       325 
                   |    100.00     100.00 |    100.00 


. 
. * ===========================================================================
. * FIGURE 8.1, RELATIONSHIP BETWEEN TIME AND DEATHS IN REVOLUTIONARY EPIOSDES
. *   INVOLVING CIVIL WARS
. * ===========================================================================
. glm totaldeaths c.newstartyr##c.newstartyr if civilwar==1 & startyear>1899, family(gamma) link(log) vce(robust)

Iteration 0:   log pseudolikelihood = -2141.3773  
Iteration 1:   log pseudolikelihood = -2068.7148  
Iteration 2:   log pseudolikelihood = -2067.8906  
Iteration 3:   log pseudolikelihood = -2067.8881  
Iteration 4:   log pseudolikelihood = -2067.8881  

Generalized linear models                         No. of obs      =        162
Optimization     : ML                             Residual df     =        159
                                                  Scale parameter =   5.537674
Deviance         =  593.8193374                   (1/df) Deviance =   3.734713
Pearson          =  880.4901023                   (1/df) Pearson  =   5.537674

Variance function: V(u) = u^2                     [Gamma]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   25.56652
Log pseudolikelihood = -2067.888085               BIC             =  -215.1085

-------------------------------------------------------------------------------------------
                          |               Robust
              totaldeaths |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
               newstartyr |   .0614656   .0240986     2.55   0.011     .0142332    .1086979
                          |
c.newstartyr#c.newstartyr |  -.0006663    .000183    -3.64   0.000     -.001025   -.0003076
                          |
                    _cons |   11.20978   .7308596    15.34   0.000      9.77732    12.64224
-------------------------------------------------------------------------------------------

. margins, at(newstartyr=(0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115))

Adjusted predictions                            Number of obs     =        162
Model VCE    : Robust

Expression   : Predicted mean totaldeaths, predict()

1._at        : newstartyr      =           0

2._at        : newstartyr      =           5

3._at        : newstartyr      =          10

4._at        : newstartyr      =          15

5._at        : newstartyr      =          20

6._at        : newstartyr      =          25

7._at        : newstartyr      =          30

8._at        : newstartyr      =          35

9._at        : newstartyr      =          40

10._at       : newstartyr      =          45

11._at       : newstartyr      =          50

12._at       : newstartyr      =          55

13._at       : newstartyr      =          60

14._at       : newstartyr      =          65

15._at       : newstartyr      =          70

16._at       : newstartyr      =          75

17._at       : newstartyr      =          80

18._at       : newstartyr      =          85

19._at       : newstartyr      =          90

20._at       : newstartyr      =          95

21._at       : newstartyr      =         100

22._at       : newstartyr      =         105

23._at       : newstartyr      =         110

24._at       : newstartyr      =         115

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   73849.09   53973.32     1.37   0.171    -31936.67    179634.8
          2  |   98760.02   62052.02     1.59   0.111    -22859.71    220379.8
          3  |   127746.1   68649.96     1.86   0.063    -6805.328    262297.6
          4  |     159825   73333.52     2.18   0.029     16093.96    303556.1
          5  |     193407   76099.59     2.54   0.011      44254.6    342559.5
          6  |     226376   77426.13     2.92   0.003     74623.55    378128.4
          7  |   256282.5   78093.25     3.28   0.001     103222.5    409342.4
          8  |   280632.5   78758.96     3.56   0.000     126267.7    434997.2
          9  |   297226.4   79505.63     3.74   0.000     141398.3    453054.6
         10  |   304486.1   79723.79     3.82   0.000     148230.3    460741.9
         11  |   301701.9   78450.75     3.85   0.000     147941.2    455462.5
         12  |   289147.2   74883.95     3.86   0.000     142377.4      435917
         13  |   268034.4    68740.8     3.90   0.000     133304.9    402763.9
         14  |   240321.5   60351.83     3.98   0.000       122034    358608.9
         15  |   208413.1    50537.9     4.12   0.000     109360.7    307465.6
         16  |   174818.8   40371.47     4.33   0.000     95692.14    253945.4
         17  |   141834.4   30914.95     4.59   0.000      81242.2    202426.6
         18  |   111302.7   22997.99     4.84   0.000     66227.44    156377.9
         19  |    84481.2   17053.07     4.95   0.000      51057.8    117904.6
         20  |    62021.9   13013.74     4.77   0.000     36515.44    87528.37
         21  |   44041.35   10366.12     4.25   0.000     23724.12    64358.57
         22  |   30248.69   8460.664     3.58   0.000     13666.09    46831.29
         23  |   20094.77   6855.745     2.93   0.003     6657.759    33531.78
         24  |    12911.9   5390.032     2.40   0.017     2347.629    23476.17
------------------------------------------------------------------------------

. 
. 
. * ===========================================
. * TESTING FOR BEST COPULA FOR SWITCHING MODEL
. * ===========================================
. * Program for identifying cupolas
. * Set specification
. * See below--Tables 8.2, 8.3, and 8.4 for selection of model specifications
. * Define x0
. local x0 = " success newpolitymin1 urbancivic newgdppcthl urbandum "

. * Define x1
. local x1 = "lnmonthsdur urbpercbefrev success "

. * Define xs
. local xs = "urbandum leftist ethnicorder "

. * Define y0
. local y0 = "lndeaths "

. * Define y1
. local y1 = "lndeaths "

. * Define s
. local s = "civilwar "

. 
. * Program
. * the benchmark model under the joint normality
. quietly switchcopula (`y0' = `x0') (`y1' = `x1'), select(`s' = `xs') iterate(75)

. * after the copula estimation
. predict xb0_0, xb0
(20 missing values generated)

. predict xb1_0, xb1
(96 missing values generated)

. predict cll0, cll

. local llmax = `e(ll)'

. display `llmax'
-572.93932

. * Program for finding best combination of cupolas
. * Finding the best-fitting copulas by using two loops
. * First loop
. foreach copula in list product gaussian fgm plackett amh frank clayton gumbel joe {
  2. capture switchcopula (`y0' = `x0') (`y1' = `x1'), select(`s' = `xs') copula0(gaussian) copula1(`copula') iter
> ate(75)
  3. if `e(ll)' > `llmax' {
  4. local llmax = `e(ll)'
  5. local bestcop1 = "`copula'"
  6. }
  7. }

. * Second loop
. foreach copula in list product gaussian fgm plackett amh frank clayton gumbel joe {
  2. capture switchcopula (`y0' = `x0') (`y1' = `x1'), select(`s' = `xs') copula0(`copula') copula1(`bestcop1') it
> erate(75)
  3. if `e(ll)' > `llmax' {
  4. local llmax = `e(ll)'
  5. local bestcop0 = "`copula'"
  6. }
  7. capture switchcopula (`y0' = `x0') (`y1' = `x1'), select(`s' = `xs') copula0(`bestcop0') copula1(`bestcop1') 
> iterate(75)
  8. estimates store best_model
  9. }

. * display the estimation result of the selected copula
. estimates replay best_model

------------------------------------------------------------------------------------------------------------------
Model best_model
------------------------------------------------------------------------------------------------------------------

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484297   -.1039428
     urbandum |  -4.682154   .8777556    -5.33   0.000    -6.402523   -2.961784
        _cons |   10.96281   .8876305    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372385   .4810269     0.08   0.938    -.9055568    .9800339
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474984   181.2114     0.04   0.971    -348.6929    361.6428
--------------+----------------------------------------------------------------
       sigma0 |   2.292617   .1450751                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941   .4992773                      .4043167    2.664547
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081965                     -.5712338   -.1681628
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. display "`bestcop0'" " `bestcop1'"
clayton fgm

. drop xb0_0 xb1_0 cll0 _est_best_model

. * Best copulas were Clayton/FGM
. 
. * =================================================================
. * INFORMATION CRITERION TESTS AND VUONG TEST ON CLAYTON-FGM COPULA 
. *   SWITCHING REGRESSION MODEL VS. JOINT NORMAL
. * =================================================================
. * Joint normal model
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) 

Iteration 0:   log likelihood = -574.00905  
Iteration 1:   log likelihood = -573.04019  
Iteration 2:   log likelihood = -572.93986  
Iteration 3:   log likelihood = -572.93932  
Iteration 4:   log likelihood = -572.93932  

Swithching Regression: Copulas gaussian-gaussian, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     100.25
Log likelihood = -572.93932                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.171943     .24164    -8.99   0.000    -2.645548   -1.698337
      leftist |   .5806096   .2441787     2.38   0.017     .1020282    1.059191
  ethnicorder |   1.389494   .2869047     4.84   0.000     .8271707    1.951817
        _cons |   .6754455   .2246871     3.01   0.003     .2350669    1.115824
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.586283    .424803    -3.73   0.000    -2.418882   -.7536847
newpolitymin1 |  -.1009483   .0343762    -2.94   0.003    -.1683244   -.0335721
   urbancivic |  -1.667561   .4349603    -3.83   0.000    -2.520068   -.8150548
  newgdppcthl |   -.226909   .0660136    -3.44   0.001    -.3562932   -.0975248
     urbandum |  -3.026546      1.412    -2.14   0.032    -5.794015   -.2590767
        _cons |   9.233353   1.611985     5.73   0.000     6.073921    12.39278
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5572673   .1547813     3.60   0.000     .2539015     .860633
      success |   1.147254   .3884865     2.95   0.003      .385834    1.908673
urbpercbefrev |  -.0288776   .0124199    -2.33   0.020    -.0532202    -.004535
        _cons |   7.900448   .7755324    10.19   0.000     6.380433    9.420464
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8396417   .0668183    12.57   0.000     .7086801    .9706032
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6064952   .0747724     8.11   0.000      .459944    .7530464
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .2565431   .3777306     0.68   0.497    -.4837953    .9968814
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   .3020238   .2202421     1.37   0.170    -.1296428    .7336905
--------------+----------------------------------------------------------------
       sigma0 |   2.315537   .1547204                      2.031308    2.639536
       sigma1 |   1.833992    .137132                      1.583985    2.123459
       theta0 |   .2510593   .3539219                      -.449278    .7602813
       theta1 |   .2931636   .2013134                     -.1289214     .625318
         tau0 |  -.1615578   .2327689                     -.5498778    .2966374
         tau1 |  -.1894161     .13405                     -.4300614     .082303
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    2.284 with p-value  0.3192
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -572.9393      18    1181.879   1243.764
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. predict cll0 if e(sample), cll
(115 missing values generated)

. * Copula model with highest log-likelihood (clayton-fgm)
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.06379  (not concave)
Iteration 1:   log likelihood = -574.09006  (not concave)
Iteration 2:   log likelihood = -573.25352  
Iteration 3:   log likelihood = -570.39348  
Iteration 4:   log likelihood = -569.95645  
Iteration 5:   log likelihood = -569.94319  
Iteration 6:   log likelihood = -569.94048  
Iteration 7:   log likelihood =  -569.9399  
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484297   -.1039428
     urbandum |  -4.682154   .8777555    -5.33   0.000    -6.402523   -2.961785
        _cons |   10.96281   .8876303    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372386   .4810265     0.08   0.938    -.9055561    .9800333
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474984   181.2114     0.04   0.971    -348.6929    361.6428
--------------+----------------------------------------------------------------
       sigma0 |   2.292617    .145075                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941    .499277                       .404317    2.664545
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081964                     -.5712336   -.1681629
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      18    1175.879   1237.765
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. predict cll1 if e(sample), cll
(115 missing values generated)

. quietly generate dll = cll1 - cll0

. regress dll

      Source |       SS           df       MS      Number of obs   =       230
-------------+----------------------------------   F(0, 229)       =      0.00
       Model |           0         0           .   Prob > F        =         .
    Residual |  57.2733845       229  .250102116   R-squared       =    0.0000
-------------+----------------------------------   Adj R-squared   =    0.0000
       Total |  57.2733845       229  .250102116   Root MSE        =     .5001

------------------------------------------------------------------------------
         dll |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |  -.1013197   .0329758    -3.07   0.002    -.1662944    -.036345
------------------------------------------------------------------------------

. * RESULT:  AIC and BIC of the Clayton-FGM copula model are significantly lower and statistically preferred to th
> e joint normal model.
. *          Vuong test is statistically significant, confirming superiority of copula model
. drop cll1 cll0 dll

. 
. * ============================================================================
. * INFORMATION CRITERION TESTS FOR IDENTIFYING PROPER DISTRIBUTION OF MARGINALS
. * ============================================================================
. * Normal marginals
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.06379  (not concave)
Iteration 1:   log likelihood = -574.09006  (not concave)
Iteration 2:   log likelihood = -573.25352  
Iteration 3:   log likelihood = -570.39348  
Iteration 4:   log likelihood = -569.95645  
Iteration 5:   log likelihood = -569.94319  
Iteration 6:   log likelihood = -569.94048  
Iteration 7:   log likelihood =  -569.9399  
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484297   -.1039428
     urbandum |  -4.682154   .8777555    -5.33   0.000    -6.402523   -2.961785
        _cons |   10.96281   .8876303    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372386   .4810265     0.08   0.938    -.9055561    .9800333
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474984   181.2114     0.04   0.971    -348.6929    361.6428
--------------+----------------------------------------------------------------
       sigma0 |   2.292617    .145075                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941    .499277                       .404317    2.664545
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081964                     -.5712336   -.1681629
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      18    1175.879   1237.765
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Margin1 as t
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(t) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.02001  (not concave)
Iteration 1:   log likelihood = -574.13777  (not concave)
Iteration 2:   log likelihood = -573.29463  
Iteration 3:   log likelihood = -570.38814  
Iteration 4:   log likelihood = -569.96394  
Iteration 5:   log likelihood = -569.94477  
Iteration 6:   log likelihood = -569.94091  
Iteration 7:   log likelihood =    -569.94  
Iteration 8:   log likelihood = -569.93978  
Iteration 9:   log likelihood = -569.93974  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-t

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93974                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |   -2.21144   .2424121    -9.12   0.000    -2.686559   -1.736321
      leftist |   .5557477   .2281096     2.44   0.015     .1086612    1.002834
  ethnicorder |      1.499   .2691034     5.57   0.000      .971567    2.026433
        _cons |   .6859117   .2232425     3.07   0.002     .2483644    1.123459
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647389   .4243604    -3.88   0.000     -2.47912   -.8156579
newpolitymin1 |  -.1013099    .034569    -2.93   0.003     -.169064   -.0335558
   urbancivic |  -1.681994   .4300327    -3.91   0.000    -2.524843   -.8391458
  newgdppcthl |  -.2261883   .0623707    -3.63   0.000    -.3484326   -.1039441
     urbandum |  -4.682058   .8777931    -5.33   0.000    -6.402501   -2.961616
        _cons |   10.96272   .8876723    12.35   0.000     9.222913    12.70252
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766505   .1454592     3.96   0.000     .2915556    .8617453
      success |   1.177383   .3773137     3.12   0.002     .4378622    1.916905
urbpercbefrev |  -.0291286    .011957    -2.44   0.015    -.0525639   -.0056934
        _cons |   7.813645   .6699679    11.66   0.000     6.500532    9.126758
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296939   .0632792    13.11   0.000     .7056691    .9537188
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029828   .0733348     8.22   0.000     .4592492    .7467164
--------------+----------------------------------------------------------------
lndf1         |
        _cons |   14.45085    182.742     0.08   0.937    -343.7168    372.6185
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0371493   .4810706     0.08   0.938    -.9057317    .9800304
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.420322   171.5754     0.04   0.970    -329.8614     342.702
--------------+----------------------------------------------------------------
       sigma0 |   2.292617   .1450749                      2.025201    2.595343
       sigma1 |   1.827562   .1340239                      1.582885     2.11006
       theta0 |   1.037848   .4992782                       .404246    2.664537
       theta1 |   .9999947   .0018192                            -1           1
          df1 |    1887665   3.45e+08                      5.3e-150    6.7e+161
         tau0 |  -.3416392   .1082033                     -.5712329   -.1681384
         tau1 |   -.222221   .0004043                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.193 with p-value  0.0104
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      19    1177.879   1243.203
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Margin0 as t
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(t) margsel(normal)

Iteration 0:   log likelihood = -580.30377  (not concave)
Iteration 1:   log likelihood = -574.20495  (not concave)
Iteration 2:   log likelihood =  -573.0976  
Iteration 3:   log likelihood = -570.48104  
Iteration 4:   log likelihood =  -569.9586  
Iteration 5:   log likelihood = -569.94397  
Iteration 6:   log likelihood = -569.94062  
Iteration 7:   log likelihood = -569.93986  (not concave)
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  
Iteration 10:  log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-t-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.07
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211349   .2424084    -9.12   0.000    -2.686461   -1.736237
      leftist |   .5557689   .2281079     2.44   0.015     .1086855    1.002852
  ethnicorder |   1.499044   .2691019     5.57   0.000     .9716143    2.026474
        _cons |   .6858123    .223238     3.07   0.002     .2482739    1.123351
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647419   .4243646    -3.88   0.000    -2.479158   -.8156793
newpolitymin1 |  -.1013119   .0345693    -2.93   0.003    -.1690666   -.0335572
   urbancivic |  -1.681993   .4300372    -3.91   0.000     -2.52485   -.8391352
  newgdppcthl |  -.2261827   .0623713    -3.63   0.000    -.3484282   -.1039372
     urbandum |  -4.682084   .8777671    -5.33   0.000    -6.402476   -2.961692
        _cons |   10.96274   .8876434    12.35   0.000     9.222994    12.70249
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766544   .1454609     3.96   0.000     .2915563    .8617526
      success |   1.177396    .377318     3.12   0.002     .4378666    1.916926
urbpercbefrev |  -.0291284   .0119571    -2.44   0.015    -.0525639   -.0056929
        _cons |   7.813605   .6699752    11.66   0.000     6.500478    9.126732
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8297047     .06328    13.11   0.000     .7056781    .9537312
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |    .602996   .0733356     8.22   0.000     .4592608    .7467312
--------------+----------------------------------------------------------------
lndf0         |
        _cons |   16.65614   92.16192     0.18   0.857    -163.9779    197.2902
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0371845   .4810601     0.08   0.938     -.905676    .9800449
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.356909   437.7038     0.02   0.987    -850.5268    865.2406
--------------+----------------------------------------------------------------
       sigma0 |   2.292642   .1450783                       2.02522    2.595375
       sigma1 |   1.827586   .1340271                      1.582904    2.110091
       theta0 |   1.037884   .4992848                      .4042685    2.664576
       theta1 |   .9999992    .000713                            -1           1
          df0 |   1.71e+07   1.58e+09                      6.10e-72    4.81e+85
         tau0 |  -.3416471   .1082021                     -.5712365   -.1681462
         tau1 |   -.222222   .0001585                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      19    1177.879   1243.203
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Margin0 as t and Margin1 as t (does not converge, must confine iterations to 11)
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(t) margin0(t) margsel(normal) iterate(11)

Iteration 0:   log likelihood = -580.25999  (not concave)
Iteration 1:   log likelihood = -574.24891  (not concave)
Iteration 2:   log likelihood = -573.14688  
Iteration 3:   log likelihood = -570.44174  
Iteration 4:   log likelihood =  -569.9659  
Iteration 5:   log likelihood = -569.94542  (not concave)
Iteration 6:   log likelihood = -569.94288  
Iteration 7:   log likelihood = -569.94045  
Iteration 8:   log likelihood =  -569.9399  (not concave)
Iteration 9:   log likelihood = -569.93977  (not concave)
Iteration 10:  log likelihood = -569.93975  
Iteration 11:  log likelihood = -569.93973  (not concave)
convergence not achieved

Swithching Regression: Copulas clayton-fgm, Margins probit-t-t

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211522   .2424168    -9.12   0.000     -2.68665   -1.736393
      leftist |   .5556983   .2281097     2.44   0.015     .1086115    1.002785
  ethnicorder |   1.499028   .2691046     5.57   0.000     .9715929    2.026463
        _cons |   .6859839   .2232471     3.07   0.002     .2484276     1.12354
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647419   .4243728    -3.88   0.000    -2.479175    -.815664
newpolitymin1 |  -.1013124   .0345699    -2.93   0.003    -.1690682   -.0335566
   urbancivic |  -1.682003   .4300452    -3.91   0.000    -2.524876   -.8391303
  newgdppcthl |  -.2261852   .0623719    -3.63   0.000    -.3484318   -.1039386
     urbandum |  -4.682514   .8777642    -5.33   0.000      -6.4029   -2.962127
        _cons |   10.96318   .8876373    12.35   0.000     9.223446    12.70292
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |    .576642    .145461     3.96   0.000     .2915437    .8617403
      success |   1.177382   .3773186     3.12   0.002     .4378512    1.916913
urbpercbefrev |  -.0291292   .0119571    -2.44   0.015    -.0525647   -.0056936
        _cons |   7.813691   .6699753    11.66   0.000     6.500563    9.126818
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8297244   .0632816    13.11   0.000     .7056949     .953754
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029954   .0733357     8.22   0.000     .4592601    .7467308
--------------+----------------------------------------------------------------
lndf0         |
        _cons |   18.16187          .        .       .            .           .
--------------+----------------------------------------------------------------
lndf1         |
        _cons |   14.17935          .        .       .            .           .
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372337   .4810258     0.08   0.938    -.9055595     .980027
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.162277   360.3203     0.02   0.984    -699.0525    713.3771
--------------+----------------------------------------------------------------
       sigma0 |   2.292687   .1450848                      2.025253    2.595435
       sigma1 |   1.827585   .1340272                      1.582902     2.11009
       theta0 |   1.037936   .4992738                      .4043156    2.664528
       theta1 |   .9999988   .0008663                            -1           1
          df0 |   7.72e+07          .                             .           .
          df1 |    1438847          .                             .           .
         tau0 |  -.3416582   .1081961                     -.5712321   -.1681624
         tau1 |   -.222222   .0001925                     -.2222222    .2222222
-------------------------------------------------------------------------------
Warning: convergence not achieved
LR test of independence :        Test statistic    8.193 with p-value  0.0104
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      18    1175.879   1237.765
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Selection portion of model as logit
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(logit)

Iteration 0:   log likelihood = -580.54764  (not concave)
Iteration 1:   log likelihood = -574.33342  
Iteration 2:   log likelihood = -572.91496  
Iteration 3:   log likelihood = -570.44788  
Iteration 4:   log likelihood = -570.27793  
Iteration 5:   log likelihood = -570.23941  
Iteration 6:   log likelihood = -570.23232  
Iteration 7:   log likelihood =  -570.2307  
Iteration 8:   log likelihood =  -570.2303  
Iteration 9:   log likelihood = -570.23022  
Iteration 10:  log likelihood =  -570.2302  

Swithching Regression: Copulas clayton-fgm, Margins logit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =      78.63
Log likelihood =  -570.2302                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |   -3.82011   .4602365    -8.30   0.000    -4.722157   -2.918063
      leftist |   1.003552   .4316993     2.32   0.020     .1574366    1.849667
  ethnicorder |    2.62833   .4871517     5.40   0.000      1.67353    3.583129
        _cons |   1.178061   .3958805     2.98   0.003      .402149    1.953972
--------------+----------------------------------------------------------------
regime0       |
      success |    -1.6447   .4242711    -3.88   0.000    -2.476256   -.8131437
newpolitymin1 |  -.1012074   .0346019    -2.92   0.003    -.1690258   -.0333889
   urbancivic |   -1.68422   .4299616    -3.92   0.000    -2.526929   -.8415105
  newgdppcthl |  -.2236339   .0626344    -3.57   0.000     -.346395   -.1008728
     urbandum |  -4.637518   .9125421    -5.08   0.000    -6.426067   -2.848968
        _cons |   10.90671   .9278463    11.75   0.000     9.088165    12.72526
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766183   .1454602     3.96   0.000     .2915215    .8617151
      success |   1.175376   .3772554     3.12   0.002     .4359689    1.914783
urbpercbefrev |  -.0292104   .0119568    -2.44   0.015    -.0526453   -.0057755
        _cons |   7.818941   .6701303    11.67   0.000      6.50551    9.132372
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8285651   .0631799    13.11   0.000     .7047348    .9523953
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6026859   .0733081     8.22   0.000     .4590047    .7463671
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.0271295   .5087847    -0.05   0.957    -1.024329    .9700702
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.758056   235.5364     0.03   0.977    -454.8848     468.401
--------------+----------------------------------------------------------------
       sigma0 |    2.29003   .1446838                       2.02331    2.591911
       sigma1 |   1.827019   .1339353                      1.582498    2.109323
       theta0 |   .9732352   .4951672                      .3590372     2.63813
       theta1 |   .9999973    .001271                            -1           1
         tau0 |  -.3273321   .1120272                     -.5687917   -.1521965
         tau1 |  -.2222216   .0002824                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    7.801 with p-value  0.0127
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -570.2302      18     1176.46   1238.346
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. *       RESULT:  Normal marginal distributions are superior to any of the alternatives for all portions of the m
> odel
. 
. 
. * +++++++++++++++++++++++++++++++++++++++++++
. * CIVIL WAR REGIME PORTION OF SWITCHING MODEL
. * +++++++++++++++++++++++++++++++++++++++++++
. * ======================================================================
. * SWITCHING REG: CHOOSING SPECIFICATIONS FOR CIVIL WAR REGIME--TABLE 8.2
. * ======================================================================
. * Model 1
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur) if sta
> rtyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) mar
> gin0(normal) margsel(normal) 

Iteration 0:   log likelihood = -808.14731  (not concave)
Iteration 1:   log likelihood = -799.41419  
Iteration 2:   log likelihood = -797.13938  
Iteration 3:   log likelihood = -793.75814  
Iteration 4:   log likelihood = -793.68086  
Iteration 5:   log likelihood = -793.68067  
Iteration 6:   log likelihood = -793.68067  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        308
                                                Wald chi2(3)      =     143.05
Log likelihood = -793.68067                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.109027   .1836421   -11.48   0.000    -2.468959   -1.749095
      leftist |   .3175585   .1913106     1.66   0.097    -.0574033    .6925203
  ethnicorder |   .9926386   .2337234     4.25   0.000     .5345492    1.450728
        _cons |   .9222912   .1535483     6.01   0.000     .6213421     1.22324
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.612506   .3967679    -4.06   0.000    -2.390157   -.8348557
newpolitymin1 |   -.090481   .0299817    -3.02   0.003    -.1492441   -.0317179
   urbancivic |  -1.721063   .4214331    -4.08   0.000    -2.547057   -.8950698
  newgdppcthl |  -.2225302   .0584921    -3.80   0.000    -.3371726   -.1078879
     urbandum |  -4.660287   .7546542    -6.18   0.000    -6.139382   -3.181192
        _cons |   11.05638   .7716461    14.33   0.000     9.543981    12.56878
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .3651328   .1380946     2.64   0.008     .0944724    .6357933
        _cons |   8.619168   .6570508    13.12   0.000     7.331372    9.906964
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8390359   .0636828    13.18   0.000     .7142199     .963852
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .7222343   .0580761    12.44   0.000     .6084072    .8360613
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .2019642   .4402516     0.46   0.646     -.660913    1.064841
--------------+----------------------------------------------------------------
atheta1       |
        _cons |  -.3352782   .7344231    -0.46   0.648    -1.774721    1.104165
--------------+----------------------------------------------------------------
       sigma0 |   2.314135   .1473706                      2.042593    2.621776
       sigma1 |   2.059029   .1195803                      1.837502    2.307261
       theta0 |   1.223804   .5387817                      .5163797    2.900379
       theta1 |  -.3232555   .6576802                     -.9441246      .80199
         tau0 |  -.3796149   .1036825                     -.5918683   -.2052074
         tau1 |   .0718346   .1461512                       -.17822    .2098055
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    4.305 with p-value  0.0771
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r) if startyear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm
> ) margin1(normal) margin0(normal) margsel(normal) 

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -577.3064      16    1186.613   1241.622
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 2
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margi
> n1(normal) margin0(normal) margsel(normal) 

Iteration 0:   log likelihood = -583.54043  (not concave)
Iteration 1:   log likelihood = -578.50065  (not concave)
Iteration 2:   log likelihood = -577.09644  
Iteration 3:   log likelihood =  -576.0256  
Iteration 4:   log likelihood = -574.69109  
Iteration 5:   log likelihood = -574.64495  
Iteration 6:   log likelihood =  -574.6331  
Iteration 7:   log likelihood = -574.62985  
Iteration 8:   log likelihood = -574.62913  
Iteration 9:   log likelihood = -574.62898  
Iteration 10:  log likelihood = -574.62895  
Iteration 11:  log likelihood = -574.62894  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     100.92
Log likelihood = -574.62894                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.214141   .2431847    -9.10   0.000    -2.690775   -1.737508
      leftist |   .5458176   .2289375     2.38   0.017     .0971085    .9945268
  ethnicorder |   1.486454   .2712078     5.48   0.000      .954897    2.018012
        _cons |   .6998279   .2232736     3.13   0.002     .2622198    1.137436
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.646594    .424447    -3.88   0.000    -2.478495    -.814693
newpolitymin1 |  -.1013604   .0345716    -2.93   0.003    -.1691195   -.0336012
   urbancivic |  -1.681449   .4300838    -3.91   0.000    -2.524398   -.8385002
  newgdppcthl |  -.2261211   .0623544    -3.63   0.000    -.3483334   -.1039088
     urbandum |  -4.693307   .8789952    -5.34   0.000    -6.416106   -2.970508
        _cons |   10.97431    .889178    12.34   0.000      9.23155    12.71706
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |    .586535   .1527087     3.84   0.000     .2872314    .8858386
urbpercbefrev |  -.0293031   .0125555    -2.33   0.020    -.0539115   -.0046948
        _cons |   8.215285   .6894158    11.92   0.000     6.864055    9.566515
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8298682   .0633261    13.10   0.000     .7057514    .9539851
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6465268   .0735204     8.79   0.000     .5024295    .7906241
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0373432   .4802416     0.08   0.938    -.9039131    .9785994
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.773654   410.8572     0.02   0.987    -798.4917     812.039
--------------+----------------------------------------------------------------
       sigma0 |   2.293017   .1452078                      2.025368    2.596034
       sigma1 |   1.908899    .140343                      1.652732    2.204772
       theta0 |   1.038049   .4985144                      .4049818    2.660727
       theta1 |   .9999974    .002149                            -1           1
         tau0 |  -.3416828   .1080235                     -.5708824   -.1683929
         tau1 |  -.2222216   .0004775                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    5.831 with p-value  0.0350
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -574.6289      17    1183.258   1241.705
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 3
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.06379  (not concave)
Iteration 1:   log likelihood = -574.09006  (not concave)
Iteration 2:   log likelihood = -573.25352  
Iteration 3:   log likelihood = -570.39346  
Iteration 4:   log likelihood = -569.95645  
Iteration 5:   log likelihood = -569.94319  
Iteration 6:   log likelihood = -569.94048  
Iteration 7:   log likelihood =  -569.9399  
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484297   -.1039428
     urbandum |  -4.682154   .8777556    -5.33   0.000    -6.402523   -2.961784
        _cons |   10.96281   .8876305    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372385   .4810269     0.08   0.938    -.9055568    .9800339
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474984   181.2114     0.04   0.971    -348.6929    361.6428
--------------+----------------------------------------------------------------
       sigma0 |   2.292617   .1450751                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941   .4992773                      .4043167    2.664547
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081965                     -.5712338   -.1681628
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9397      18    1175.879   1237.765
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 4
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev success newpolitymin1) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayt
> on) copula1(fgm) margin1(normal) margin0(normal) margsel(normal) 

Iteration 0:   log likelihood = -578.45076  (not concave)
Iteration 1:   log likelihood = -572.64143  (not concave)
Iteration 2:   log likelihood = -571.88868  
Iteration 3:   log likelihood = -568.92186  
Iteration 4:   log likelihood = -568.50807  
Iteration 5:   log likelihood = -568.49177  
Iteration 6:   log likelihood = -568.48848  
Iteration 7:   log likelihood = -568.48776  
Iteration 8:   log likelihood =  -568.4876  
Iteration 9:   log likelihood = -568.48756  
Iteration 10:  log likelihood = -568.48755  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.06
Log likelihood = -568.48755                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.204162   .2423844    -9.09   0.000    -2.679227   -1.729097
      leftist |   .5625881   .2285297     2.46   0.014     .1146781    1.010498
  ethnicorder |   1.503286   .2692376     5.58   0.000     .9755895    2.030982
        _cons |   .6766945   .2237681     3.02   0.002     .2381171    1.115272
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.648155   .4243347    -3.88   0.000    -2.479836   -.8164744
newpolitymin1 |  -.1012761   .0345699    -2.93   0.003     -.169032   -.0335203
   urbancivic |  -1.682733   .4300321    -3.91   0.000     -2.52558   -.8398858
  newgdppcthl |  -.2261627   .0623939    -3.62   0.000    -.3484525    -.103873
     urbandum |   -4.67205   .8780411    -5.32   0.000    -6.392979   -2.951121
        _cons |   10.95349   .8880291    12.33   0.000     9.212984    12.69399
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5559819   .1437156     3.87   0.000     .2743046    .8376593
urbpercbefrev |  -.0280627   .0117494    -2.39   0.017    -.0510911   -.0050343
      success |   1.072371   .3764255     2.85   0.004     .3345909    1.810152
newpolitymin1 |  -.0509791   .0296731    -1.72   0.086    -.1091372    .0071791
        _cons |   7.874339   .6599745    11.93   0.000     6.580812    9.167865
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296156   .0632684    13.11   0.000     .7056119    .9536193
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .5874399   .0732992     8.01   0.000     .4437761    .7311037
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0350243   .4822812     0.07   0.942    -.9102295    .9802781
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.766572   685.4214     0.01   0.991    -1335.635    1351.168
--------------+----------------------------------------------------------------
       sigma0 |   2.292437   .1450388                      2.025085    2.595085
       sigma1 |   1.799376   .1318928                      1.558582    2.077372
       theta0 |   1.035645   .4994721                      .4024319    2.665197
       theta1 |   .9999996   .0004921                            -1           1
         tau0 |  -.3411614   .1084025                     -.5712936   -.1675102
         tau1 |  -.2222221   .0001094                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    7.958 with p-value  0.0117
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -568.4876      19    1174.975   1240.299
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 5
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev success lnpop) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copu
> la1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -578.32711  (not concave)
Iteration 1:   log likelihood = -572.25835  (not concave)
Iteration 2:   log likelihood = -571.32464  
Iteration 3:   log likelihood = -568.69552  
Iteration 4:   log likelihood = -568.18837  
Iteration 5:   log likelihood = -568.17589  
Iteration 6:   log likelihood = -568.17313  
Iteration 7:   log likelihood = -568.17256  
Iteration 8:   log likelihood = -568.17243  
Iteration 9:   log likelihood =  -568.1724  
Iteration 10:  log likelihood = -568.17239  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     101.36
Log likelihood = -568.17239                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.203194   .2425948    -9.08   0.000    -2.678671   -1.727717
      leftist |   .5582131   .2283613     2.44   0.015     .1106331    1.005793
  ethnicorder |   1.494681   .2686697     5.56   0.000     .9680984    2.021264
        _cons |   .6772985    .223556     3.03   0.002     .2391367     1.11546
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647446   .4243953    -3.88   0.000    -2.479245    -.815646
newpolitymin1 |  -.1013025   .0345725    -2.93   0.003    -.1690633   -.0335416
   urbancivic |  -1.682216   .4300843    -3.91   0.000    -2.525166    -.839266
  newgdppcthl |  -.2261205   .0624023    -3.62   0.000    -.3484267   -.1038143
     urbandum |  -4.668475   .8789362    -5.31   0.000    -6.391158   -2.945791
        _cons |   10.94882   .8890693    12.31   0.000     9.206279    12.69137
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5489649   .1431047     3.84   0.000     .2684848    .8294451
urbpercbefrev |  -.0286899   .0117355    -2.44   0.014    -.0516911   -.0056887
      success |   1.218121   .3703216     3.29   0.001     .4923034    1.943938
        lnpop |   .2459495   .1292052     1.90   0.057     -.007288    .4991871
        _cons |    5.63901   1.321991     4.27   0.000     3.047955    8.230065
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8297817   .0632896    13.11   0.000     .7057364     .953827
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .5836481   .0732868     7.96   0.000     .4400086    .7272876
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372486   .4831892     0.08   0.939    -.9097848     .984282
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.307009   421.8951     0.02   0.986    -819.5922    834.2063
--------------+----------------------------------------------------------------
       sigma0 |   2.292818   .1451115                      2.025338    2.595624
       sigma1 |   1.792566   .1313714                      1.552721     2.06946
       theta0 |   1.037951   .5015267                      .4026109     2.67589
       theta1 |   .9999991   .0007594                            -1           1
         tau0 |  -.3416615   .1086832                     -.5722739   -.1675722
         tau1 |   -.222222   .0001688                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.347 with p-value  0.0096
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -568.1724      19    1174.345   1239.668
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 6
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev success ethnicorder) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton
> ) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -579.81796  (not concave)
Iteration 1:   log likelihood = -574.19037  (not concave)
Iteration 2:   log likelihood = -573.53411  
Iteration 3:   log likelihood = -570.37386  
Iteration 4:   log likelihood = -569.96213  
Iteration 5:   log likelihood = -569.94204  
Iteration 6:   log likelihood = -569.93713  
Iteration 7:   log likelihood = -569.93614  
Iteration 8:   log likelihood = -569.93593  
Iteration 9:   log likelihood = -569.93588  
Iteration 10:  log likelihood = -569.93587  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.03
Log likelihood = -569.93587                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.212599   .2427545    -9.11   0.000    -2.688389   -1.736809
      leftist |   .5555374   .2281137     2.44   0.015     .1084427    1.002632
  ethnicorder |   1.497302   .2699762     5.55   0.000     .9681585    2.026446
        _cons |   .6874196   .2238516     3.07   0.002     .2486785    1.126161
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647373   .4243839    -3.88   0.000    -2.479151   -.8155962
newpolitymin1 |  -.1013167   .0345703    -2.93   0.003    -.1690733   -.0335601
   urbancivic |  -1.681961   .4300527    -3.91   0.000    -2.524849   -.8390731
  newgdppcthl |  -.2261828   .0623709    -3.63   0.000    -.3484275   -.1039381
     urbandum |  -4.684736    .878291    -5.33   0.000    -6.406154   -2.963317
        _cons |   10.96531   .8881836    12.35   0.000     9.224499    12.70611
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5749375   .1466857     3.92   0.000     .2874389    .8624362
urbpercbefrev |  -.0288968    .012242    -2.36   0.018    -.0528906    -.004903
      success |   1.182406   .3815209     3.10   0.002     .4346388    1.930173
  ethnicorder |  -.0349926   .3979848    -0.09   0.930    -.8150284    .7450432
        _cons |   7.827795   .6885808    11.37   0.000     6.478201    9.177388
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8297448   .0632866    13.11   0.000     .7057054    .9537842
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6026766    .073415     8.21   0.000     .4587858    .7465674
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0373475   .4809549     0.08   0.938    -.9053068    .9800018
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.960722   299.2836     0.02   0.981    -579.6243    593.5457
--------------+----------------------------------------------------------------
       sigma0 |   2.292733   .1450992                      2.025275    2.595513
       sigma1 |   1.827002   .1341295                      1.582152    2.109746
       theta0 |   1.038054    .499257                      .4044178    2.664461
       theta1 |   .9999982   .0010768                            -1           1
         tau0 |  -.3416838   .1081841                     -.5712259   -.1681978
         tau1 |  -.2222218   .0002393                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    7.790 with p-value  0.0128
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.9359      19    1177.872   1243.195
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 7
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur urbperc
> befrev success leftist) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) co
> pula1 (fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -579.65458  (not concave)
Iteration 1:   log likelihood = -573.56876  (not concave)
Iteration 2:   log likelihood = -572.63056  
Iteration 3:   log likelihood = -569.94546  
Iteration 4:   log likelihood = -569.40715  
Iteration 5:   log likelihood = -569.39455  
Iteration 6:   log likelihood = -569.39169  
Iteration 7:   log likelihood = -569.39105  
Iteration 8:   log likelihood = -569.39096  
Iteration 9:   log likelihood = -569.39094  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.39094                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.220053    .242647    -9.15   0.000    -2.695633   -1.744474
      leftist |    .534838   .2289624     2.34   0.019     .0860801     .983596
  ethnicorder |     1.4987   .2685251     5.58   0.000     .9724009       2.025
        _cons |   .7001449   .2233308     3.14   0.002     .2624245    1.137865
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.645805   .4243861    -3.88   0.000    -2.477587   -.8140235
newpolitymin1 |  -.1013949   .0345638    -2.93   0.003    -.1691387   -.0336512
   urbancivic |  -1.680289   .4300094    -3.91   0.000    -2.523092   -.8374857
  newgdppcthl |  -.2261593   .0623093    -3.63   0.000    -.3482833   -.1040353
     urbandum |  -4.692044    .874995    -5.36   0.000    -6.407003   -2.977085
        _cons |   10.97142   .8840345    12.41   0.000     9.238743    12.70409
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .6405615   .1572811     4.07   0.000     .3322962    .9488268
urbpercbefrev |  -.0301617   .0119495    -2.52   0.012    -.0535823    -.006741
      success |   1.134572   .3778004     3.00   0.003     .3940972    1.875048
      leftist |  -.4385851    .418005    -1.05   0.294     -1.25786    .3806897
        _cons |   7.760141   .6697132    11.59   0.000     6.447527    9.072755
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8298464   .0632993    13.11   0.000      .705782    .9539107
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .5981204   .0733101     8.16   0.000     .4544351    .7418056
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0441845   .4776513     0.09   0.926    -.8919949    .9803639
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.156675   349.3946     0.02   0.984    -677.6442    691.9575
--------------+----------------------------------------------------------------
       sigma0 |   2.292966   .1451432                       2.02543    2.595841
       sigma1 |   1.818697    .133329                      1.575283    2.099723
       theta0 |   1.045175   .4992293                      .4098373    2.665426
       theta1 |   .9999988   .0008495                            -1           1
         tau0 |  -.3432233   .1076727                     -.5713146   -.1700685
         tau1 |   -.222222   .0001888                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.565 with p-value  0.0086
------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        230         .  -569.3909      19    1176.782   1242.105
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. *
. * Likelihood ratio tests to determine which model is more accurate
. * Testing Model 3 vs. Model 4, Model 3 vs. Model 5
. * Model 3
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r urbpercbefrev success ) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) 
> copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estimates store A

. * Model 4
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r urbpercbefrev success newpolitymin1) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copu
> la0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal) 

. estimates store B

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r urbpercbefrev success lnpop) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clay
> ton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal) 

. estimates store C

. * LR tests
. * Model 4 vs. Model 3
. lrtest A B

Likelihood-ratio test                                 LR chi2(1)  =      2.90
(Assumption: A nested in B)                           Prob > chi2 =    0.0883

. *       RESULT:  LR chi2(1)=2.88, p=0.0899  Cannot conclude that Model 4 is superior to Model 3 at the .05 level
. * Model 5 vs. Model 3
. lrtest A C

Likelihood-ratio test                                 LR chi2(1)  =      3.53
(Assumption: A nested in C)                           Prob > chi2 =    0.0601

. *       RESULT:  LR chi2(1)=3.56, p=0.0592  Cannot conclude that Model 5 is superior to Model 3 at the .05 level
. * Model 3 is selected
. drop _est_A _est_B _est_C

. *
. * ===========================================================
. * SWITCHING REG: ESTIMATED CHANGE IN DEATHS DUE TO SHORTENED 
. *   CIVIL WARS IN POST-COLD WAR PERIOD
. * ===========================================================
. * Full switching model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat lnmonthsdur if civilwar==1 & startyear>1899 & e(sample), s(mean) by(timeperiods) save

Summary for variables: lnmonthsdur
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  3.294047
  1950-1984 |  4.469652
  1985-2014 |   3.65686
------------+----------
      Total |  3.958544
-----------------------

. mat total1 = r(Stat2)

. mat total2 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
4.4696516

. local newtot2 = total2[1,1]

. display `newtot2'
3.6568604

. * Reassign var
. local dur1 = `newtot1'

. local dur2 = `newtot2'

. * Calculate marginal effects for average duration for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 2

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb1)+(0.5*(`param2')*(`param2'))))) at(lnmonthsdur=(`dur1' `dur2')) sub
> pop(if civilwar==1)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =         93
Model VCE    : OIM

Expression   : exp((predict(xb1)+(0.5*(1.827581073694099)*(1.827581073694099))))

1._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =    .3978495 (mean)
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =    4.469652
               urbpercbef~v    =    17.51282 (mean)

2._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =    .3978495 (mean)
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =     3.65686
               urbpercbef~v    =    17.51282 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   165940.4   33572.19     4.94   0.000     100140.1    231740.7
          2  |   103848.7   19852.82     5.23   0.000     64937.86    142759.5
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m2 = el(r(b),1,2)

. scalar mdiff = m2 - m1

. display mdiff
-62091.704

. * Calculate effect: Multiply effect times number of civil wars in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar cwnum = tper[3,2]

. display cwnum
48

. display mdiff * cwnum
-2980401.8

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ==============================================================
. * SWITCHING REG: ESTIMATED CHANGE IN DEATHS DUE TO URBANIZATION 
. *   IN POST-COLD WAR PERIOD
. * ==============================================================
. * Full switching model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat urbpercbefrev if civilwar==1 & startyear>1899 & e(sample), s(mean) by(timeperiods) save

Summary for variables: urbpercbefrev
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  8.741038
  1950-1984 |  15.93122
  1985-2014 |  25.08289
------------+----------
      Total |  17.51282
-----------------------

. mat total1 = r(Stat2)

. mat total2 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
15.931224

. local newtot2 = total2[1,1]

. display `newtot2'
25.082886

. * Reassign var
. local urb1 = `newtot1'

. local urb2 = `newtot2'

. * Calculate marginal effects for average level of urbanization for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 2

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb1)+(0.5*(`param2')*(`param2'))))) at(urbpercbefrev=(`urb1' `urb2')) s
> ubpop(if civilwar==1)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =         93
Model VCE    : OIM

Expression   : exp((predict(xb1)+(0.5*(1.827581073694099)*(1.827581073694099))))

1._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =    .3978495 (mean)
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =    3.958544 (mean)
               urbpercbef~v    =    15.93122

2._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =    .3978495 (mean)
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =    3.958544 (mean)
               urbpercbef~v    =    25.08289

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |     129408   24353.97     5.31   0.000     81675.05    177140.9
          2  |   99125.97   20409.69     4.86   0.000     59123.71    139128.2
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m2 = el(r(b),1,2)

. scalar mdiff = m2 - m1

. display mdiff
-30281.994

. * Calculate effect: Multiply effect times number of civil wars in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar cwnum = tper[3,2]

. display cwnum
48

. display mdiff * cwnum
-1453535.7

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * =================================================================
. * SWITCHING REG:  ESTIMATED CHANGE IN DEATHS DUE TO CHANGING RATES 
. *   OF OPPOSITION SUCCESS IN CIVIL WAR IN POST-COLD WAR PERIOD
. * =================================================================
. * Full switching model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. * Calculate marginal effects for opposition success
. local param1 = e(k) - 2

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb1)+(0.5*(`param2')*(`param2'))))) at(success=(0 1)) subpop(if civilwa
> r==1)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =         93
Model VCE    : OIM

Expression   : exp((predict(xb1)+(0.5*(1.827581073694099)*(1.827581073694099))))

1._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =           0
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =    3.958544 (mean)
               urbpercbef~v    =    17.51282 (mean)

2._at        : urbandum        =    .2365591 (mean)
               leftist         =    .3655914 (mean)
               ethnicorder     =    .3978495 (mean)
               success         =           1
               newpolitym~1    =   -.8924731 (mean)
               urbancivic      =    .0215054 (mean)
               newgdppcthl     =    1.809703 (mean)
               lnmonthsdur     =    3.958544 (mean)
               urbpercbef~v    =    17.51282 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   77360.57   18307.31     4.23   0.000      41478.9    113242.2
          2  |   251103.1   74791.71     3.36   0.001       104514    397692.2
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for failed and successful revolutionary civil wars 
. scalar m1 = el(r(b),1,1)

. scalar m2 = el(r(b),1,2)

. scalar mdiff = m2 - m1

. display mdiff
173742.53

. * Calculate difference in number of conventional civil wars for each period
. tab timeperiod success if civilwar==1 & startyear>1899, matcell(civsuc)

           | Succeeded in gaining
      Time |        power?
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        49         11 |        60 
 1950-1984 |        45         21 |        66 
 1985-2014 |        32         16 |        48 
-----------+----------------------+----------
     Total |       126         48 |       174 


. local cwnum2 = civsuc[2,2]

. display `cwnum2'
21

. local cwnum3 = civsuc[3,2]

. display `cwnum3'
16

. local cwnum4 = `cwnum3' - `cwnum2'

. display `cwnum4'
-5

. * Calculate effect:  Multiply difference in number of successful civil wars by difference in marginal effects
. display mdiff * `cwnum4'
-868712.63

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. 
. * ++++++++++++++++++++++++++++++++++++
. * SELECTION PORTION OF SWITCHING MODEL
. * ++++++++++++++++++++++++++++++++++++
. * ======================================================================================
. * FIGURE 8.2, THE PROBABILITY THAT A REVOLUTIONARY EPIOSDE INVOLVED CIVIL WAR, OVER TIME
. * ======================================================================================
. logit civilwar c.startyear##c.startyear if startyear>1899, or

Iteration 0:   log likelihood = -237.71304  
Iteration 1:   log likelihood = -233.63201  
Iteration 2:   log likelihood = -233.63058  
Iteration 3:   log likelihood = -233.63058  

Logistic regression                             Number of obs     =        343
                                                LR chi2(2)        =       8.16
                                                Prob > chi2       =     0.0169
Log likelihood = -233.63058                     Pseudo R2         =     0.0172

-----------------------------------------------------------------------------------------
               civilwar | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------+----------------------------------------------------------------
              startyear |   3.195803   1.442726     2.57   0.010     1.319199    7.741938
                        |
c.startyear#c.startyear |   .9997026   .0001152    -2.58   0.010     .9994769    .9999284
                        |
                  _cons |          0          0    -2.57   0.010            0    6.1e-117
-----------------------------------------------------------------------------------------

. margins ,  at(startyear=(1900 1905 1910 1915 1920 1925 1930 1935 1940 1945 1950 1955 1960 1965 1970 1975 1980 19
> 85 1990 1995 2000 2005 2010 2015))

Adjusted predictions                            Number of obs     =        343
Model VCE    : OIM

Expression   : Pr(civilwar), predict()

1._at        : startyear       =        1900

2._at        : startyear       =        1905

3._at        : startyear       =        1910

4._at        : startyear       =        1915

5._at        : startyear       =        1920

6._at        : startyear       =        1925

7._at        : startyear       =        1930

8._at        : startyear       =        1935

9._at        : startyear       =        1940

10._at       : startyear       =        1945

11._at       : startyear       =        1950

12._at       : startyear       =        1955

13._at       : startyear       =        1960

14._at       : startyear       =        1965

15._at       : startyear       =        1970

16._at       : startyear       =        1975

17._at       : startyear       =        1980

18._at       : startyear       =        1985

19._at       : startyear       =        1990

20._at       : startyear       =        1995

21._at       : startyear       =        2000

22._at       : startyear       =        2005

23._at       : startyear       =        2010

24._at       : startyear       =        2015

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .3894786   .0861042     4.52   0.000     .2207175    .5582396
          2  |   .4258636   .0744342     5.72   0.000     .2799752    .5717519
          3  |   .4593741   .0633479     7.25   0.000     .3352145    .5835338
          4  |   .4895395   .0537217     9.11   0.000      .384247     .594832
          5  |   .5160683   .0462326    11.16   0.000     .4254541    .6066826
          6  |   .5388137   .0412505    13.06   0.000     .4579643    .6196632
          7  |   .5577337   .0386949    14.41   0.000     .4818931    .6335742
          8  |   .5728527   .0380308    15.06   0.000     .4983137    .6473917
          9  |   .5842291   .0385064    15.17   0.000      .508758    .6597002
         10  |   .5919294   .0394387    15.01   0.000     .5146308    .6692279
         11  |   .5960092   .0403409    14.77   0.000     .5169425     .675076
         12  |   .5965018    .040911    14.58   0.000     .5163178    .6766858
         13  |   .5934112   .0409809    14.48   0.000     .5130902    .6737323
         14  |    .586712   .0404799    14.49   0.000     .5073728    .6660511
         15  |   .5763536   .0394276    14.62   0.000      .499077    .6536302
         16  |    .562271    .037961    14.81   0.000     .4878688    .6366732
         17  |   .5444015   .0363976    14.96   0.000     .4730634    .6157395
         18  |    .522708   .0353124    14.80   0.000      .453497    .5919191
         19  |   .4972109   .0355364    13.99   0.000     .4275608     .566861
         20  |    .468024   .0379006    12.35   0.000     .3937401    .5423078
         21  |   .4353951   .0427555    10.18   0.000     .3515958    .5191944
         22  |   .3997428   .0497321     8.04   0.000     .3022698    .4972159
         23  |   .3616818   .0579524     6.24   0.000     .2480971    .4752664
         24  |   .3220255   .0663386     4.85   0.000     .1920043    .4520467
------------------------------------------------------------------------------

. 
. * ====================================================================
. * IDENTIFYING BEST SELECTION PORTION OF THE SWITCHING MODEL--TABLE 8.3
. * ====================================================================
. * Model 1
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum) copula0(clayton) copula1(fgm) margin1(normal) m
> argin0(normal) margsel(normal)

Iteration 0:   log likelihood = -593.93603  
Iteration 1:   log likelihood = -588.72131  
Iteration 2:   log likelihood = -585.95021  
Iteration 3:   log likelihood = -585.81874  
Iteration 4:   log likelihood = -585.81713  
Iteration 5:   log likelihood = -585.81712  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(1)      =     100.80
Log likelihood = -585.81712                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.243053   .2234087   -10.04   0.000    -2.680926    -1.80518
        _cons |   1.199824   .1844387     6.51   0.000      .838331    1.561317
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.575326   .4277285    -3.68   0.000    -2.413658   -.7369933
newpolitymin1 |  -.1027142   .0347138    -2.96   0.003    -.1707521   -.0346763
   urbancivic |  -1.643859   .4326966    -3.80   0.000    -2.491928   -.7957889
  newgdppcthl |  -.2130482   .0633455    -3.36   0.001    -.3372031   -.0888932
     urbandum |  -4.721264   1.210696    -3.90   0.000    -7.094184   -2.348343
        _cons |   10.92463   1.277795     8.55   0.000     8.420203    13.42907
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5492434    .153899     3.57   0.000      .247607    .8508799
      success |   1.108824   .3850113     2.88   0.004     .3542154    1.863432
urbpercbefrev |   -.029616   .0121903    -2.43   0.015    -.0535086   -.0057235
        _cons |   8.040854   .7422778    10.83   0.000     6.586016    9.495692
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8351269   .0671846    12.43   0.000     .7034475    .9668064
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6020899   .0739455     8.14   0.000     .4571592    .7470205
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.0647719    .739788    -0.09   0.930     -1.51473    1.385186
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   .6600286    .679907     0.97   0.332    -.6725646    1.992622
--------------+----------------------------------------------------------------
       sigma0 |   2.305107   .1548677                      2.020707    2.629533
       sigma1 |   1.825931   .1350195                       1.57958    2.110702
       theta0 |   .9372813   .6933894                      .2198676    3.995569
       theta1 |   .5783824   .4524603                     -.5866644    .9635026
         tau0 |  -.3190982   .1607371                     -.6664203   -.0990454
         tau1 |  -.1285294   .1005467                     -.2141117    .1303699
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    1.567 with p-value  0.3338
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum) copula0(clayton) copula1(f
> gm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -582.0477      16    1196.095   1250.965
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 2
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum ethnicorder) copula0(clayton) copula1(fgm) margi
> n1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -581.71828  (not concave)
Iteration 1:   log likelihood = -576.91896  (not concave)
Iteration 2:   log likelihood = -575.51765  
Iteration 3:   log likelihood = -574.79327  
Iteration 4:   log likelihood = -573.01616  
Iteration 5:   log likelihood = -572.95898  
Iteration 6:   log likelihood = -572.94593  
Iteration 7:   log likelihood = -572.94278  
Iteration 8:   log likelihood = -572.94201  
Iteration 9:   log likelihood = -572.94185  
Iteration 10:  log likelihood = -572.94181  
Iteration 11:  log likelihood =  -572.9418  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(2)      =     101.91
Log likelihood =  -572.9418                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.286102   .2400543    -9.52   0.000      -2.7566   -1.815604
  ethnicorder |   1.332959   .2542271     5.24   0.000     .8346829    1.831235
        _cons |   .9655143    .196336     4.92   0.000     .5807028    1.350326
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.600852    .424246    -3.77   0.000    -2.432359   -.7693456
newpolitymin1 |  -.1029472   .0344221    -2.99   0.003    -.1704132   -.0354811
   urbancivic |  -1.642819   .4291798    -3.83   0.000    -2.483996   -.8016422
  newgdppcthl |  -.2212545   .0613732    -3.61   0.000    -.3415438   -.1009653
     urbandum |   -4.65921   .8515748    -5.47   0.000    -6.328266   -2.990154
        _cons |   10.89488   .8474368    12.86   0.000     9.233937    12.55583
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5600264   .1459275     3.84   0.000     .2740138     .846039
      success |   1.166734   .3793427     3.08   0.002     .4232359    1.910232
urbpercbefrev |  -.0294329   .0119955    -2.45   0.014    -.0529438   -.0059221
        _cons |   7.889051   .6710044    11.76   0.000     6.573906    9.204195
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8313948   .0637519    13.04   0.000     .7064435    .9563462
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6055658    .073529     8.24   0.000     .4614517      .74968
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .1153169    .458862     0.25   0.802    -.7840361     1.01467
--------------+----------------------------------------------------------------
atheta1       |
        _cons |    6.77294   336.7348     0.02   0.984    -653.2151     666.761
--------------+----------------------------------------------------------------
       sigma0 |    2.29652   .1464074                       2.02677    2.602171
       sigma1 |   1.832289   .1347263                      1.586375    2.116323
       theta0 |   1.122229   .5149483                      .4565596    2.758453
       theta1 |   .9999974   .0017638                            -1           1
         tau0 |   -.359432   .1056487                     -.5796953   -.1858532
         tau1 |  -.2222216    .000392                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    7.816 with p-value  0.0126
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum ethnicorder) copula0(clayto
> n) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -569.1632      17    1172.326   1230.625
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 3
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum ethnicorder leftist) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.06379  (not concave)
Iteration 1:   log likelihood = -574.09006  (not concave)
Iteration 2:   log likelihood = -573.25352  
Iteration 3:   log likelihood = -570.39348  
Iteration 4:   log likelihood = -569.95645  
Iteration 5:   log likelihood = -569.94319  
Iteration 6:   log likelihood = -569.94048  
Iteration 7:   log likelihood =  -569.9399  
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484297   -.1039428
     urbandum |  -4.682154   .8777555    -5.33   0.000    -6.402523   -2.961785
        _cons |   10.96281   .8876303    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372386   .4810265     0.08   0.938     -.905556    .9800332
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474984   181.2114     0.04   0.971    -348.6928    361.6428
--------------+----------------------------------------------------------------
       sigma0 |   2.292617    .145075                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941   .4992769                       .404317    2.664545
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081964                     -.5712336   -.1681629
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum ethnicorder leftist) copula
> 0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -566.2811      18    1168.562    1230.29
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 4
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum ethnicorder leftist newpolitymin1) copula0(clayt
> on) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -579.83458  (not concave)
Iteration 1:   log likelihood = -573.80845  (not concave)
Iteration 2:   log likelihood = -573.01896  
Iteration 3:   log likelihood = -570.63626  
Iteration 4:   log likelihood = -569.62394  
Iteration 5:   log likelihood = -569.60637  
Iteration 6:   log likelihood = -569.60268  
Iteration 7:   log likelihood = -569.60185  
Iteration 8:   log likelihood = -569.60164  
Iteration 9:   log likelihood =  -569.6016  
Iteration 10:  log likelihood = -569.60159  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(4)      =     102.95
Log likelihood = -569.60159                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.200229   .2426232    -9.07   0.000    -2.675761   -1.724696
  ethnicorder |   1.503324    .267479     5.62   0.000     .9790749    2.027573
      leftist |   .5442067    .227833     2.39   0.017     .0976623    .9907512
newpolitymin1 |   .0141091   .0171293     0.82   0.410    -.0194637    .0476819
        _cons |   .6948891   .2242756     3.10   0.002     .2553169    1.134461
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.642413   .4240321    -3.87   0.000      -2.4735   -.8113251
newpolitymin1 |  -.0959001   .0351992    -2.72   0.006    -.1648892    -.026911
   urbancivic |  -1.682623   .4297271    -3.92   0.000    -2.524873   -.8403736
  newgdppcthl |  -.2231928   .0621027    -3.59   0.000    -.3449119   -.1014738
     urbandum |  -4.669323   .8615295    -5.42   0.000     -6.35789   -2.980756
        _cons |   10.94898   .8694482    12.59   0.000      9.24489    12.65306
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |    .573628   .1454738     3.94   0.000     .2885047    .8587514
      success |   1.171807   .3772785     3.11   0.002     .4323545    1.911259
urbpercbefrev |  -.0292377   .0119443    -2.45   0.014     -.052648   -.0058273
        _cons |   7.830689   .6703621    11.68   0.000     6.516804    9.144575
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296764    .063203    13.13   0.000     .7058008     .953552
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6026367   .0733231     8.22   0.000     .4589261    .7463473
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0563208   .4712411     0.12   0.905    -.8672947    .9799363
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.079573   327.4337     0.02   0.983    -634.6787    648.8378
--------------+----------------------------------------------------------------
       sigma0 |   2.292577   .1448977                      2.025468     2.59491
       sigma1 |    1.82693   .1339561                      1.582374    2.109281
       theta0 |   1.057937   .4985434                      .4200865    2.664287
       theta1 |   .9999986   .0009288                            -1           1
         tau0 |  -.3459643   .1066291                     -.5712099   -.1735832
         tau1 |  -.2222219   .0002064                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.735 with p-value  0.0079
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum ethnicorder leftist newpoli
> tymin1) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -565.9079      19    1169.816   1234.973
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 5
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum ethnicorder leftist newgdppcthl) copula0(clayton
> ) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -578.85236  (not concave)
Iteration 1:   log likelihood = -572.85558  
Iteration 2:   log likelihood = -570.86481  
Iteration 3:   log likelihood = -569.36059  
Iteration 4:   log likelihood = -569.28374  
Iteration 5:   log likelihood =  -569.2667  
Iteration 6:   log likelihood = -569.26259  
Iteration 7:   log likelihood = -569.26167  
Iteration 8:   log likelihood = -569.26147  
Iteration 9:   log likelihood = -569.26143  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(4)      =     101.51
Log likelihood = -569.26143                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.135834    .251031    -8.51   0.000    -2.627846   -1.643822
  ethnicorder |   1.471563   .2747511     5.36   0.000     .9330607    2.010065
      leftist |   .5483767   .2326267     2.36   0.018     .0924366    1.004317
  newgdppcthl |  -.0515119    .045664    -1.13   0.259    -.1410117    .0379879
        _cons |    .789099   .2425493     3.25   0.001     .3137111    1.264487
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.649663   .4232138    -3.90   0.000    -2.479147   -.8201796
newpolitymin1 |   -.102483   .0346206    -2.96   0.003     -.170338    -.034628
   urbancivic |  -1.658448   .4294371    -3.86   0.000    -2.500129   -.8167667
  newgdppcthl |  -.2468569   .0658181    -3.75   0.000     -.375858   -.1178558
     urbandum |  -4.489368   .9456567    -4.75   0.000    -6.342821   -2.635915
        _cons |   10.81962   .9612507    11.26   0.000     8.935607    12.70364
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5740874   .1457165     3.94   0.000     .2884882    .8596866
      success |   1.177826   .3774992     3.12   0.002     .4379408     1.91771
urbpercbefrev |  -.0293797   .0119615    -2.46   0.014    -.0528237   -.0059356
        _cons |   7.830559   .6717199    11.66   0.000     6.514012    9.147106
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8251626   .0629061    13.12   0.000     .7018689    .9484563
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6030105    .073339     8.22   0.000     .4592688    .7467523
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.1066171   .5406346    -0.20   0.844    -1.166242    .9530073
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.767964   241.3609     0.03   0.978    -466.2907    479.8267
--------------+----------------------------------------------------------------
       sigma0 |   2.282252   .1435676                       2.01752    2.581721
       sigma1 |   1.827613   .1340353                      1.582916    2.110136
       theta0 |   .8988698   .4859601                      .3115356    2.593497
       theta1 |   .9999974   .0012769                            -1           1
         tau0 |  -.3100759   .1156573                     -.5646019   -.1347743
         tau1 |  -.2222216   .0002837                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    6.955 with p-value  0.0196
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum ethnicorder leftist newgdpp
> cthl) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -565.6195      19    1169.239   1234.397
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 6
. switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdur success
>  urbpercbefrev) if startyear>1899, select (civilwar =  urbandum ethnicorder leftist newlnoill diamonddum ) copul
> a0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -575.22818  (not concave)
Iteration 1:   log likelihood = -569.18677  (not concave)
Iteration 2:   log likelihood = -568.52747  
Iteration 3:   log likelihood = -566.15245  
Iteration 4:   log likelihood = -566.12904  
Iteration 5:   log likelihood = -565.03925  
Iteration 6:   log likelihood = -565.00197  
Iteration 7:   log likelihood =  -564.9995  
Iteration 8:   log likelihood = -564.99893  
Iteration 9:   log likelihood = -564.99881  
Iteration 10:  log likelihood = -564.99879  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        228
                                                Wald chi2(5)      =      99.65
Log likelihood = -564.99879                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.148837   .2477823    -8.67   0.000    -2.634482   -1.663193
  ethnicorder |   1.510837    .274464     5.50   0.000     .9728979    2.048777
      leftist |   .5336357   .2305645     2.31   0.021     .0817376    .9855338
    newlnoill |  -.0279715   .0240225    -1.16   0.244    -.0750546    .0191117
   diamonddum |   .4871977   .3850435     1.27   0.206    -.2674736    1.241869
        _cons |   .7112632    .232126     3.06   0.002     .2563047    1.166222
--------------+----------------------------------------------------------------
regime0       |
      success |  -1.652936   .4284953    -3.86   0.000    -2.492771   -.8131003
newpolitymin1 |  -.1013107    .034969    -2.90   0.004    -.1698487   -.0327728
   urbancivic |  -1.661742   .4329526    -3.84   0.000    -2.510313   -.8131707
  newgdppcthl |  -.2366634   .0637865    -3.71   0.000    -.3616827    -.111644
     urbandum |  -4.623426   .8729031    -5.30   0.000    -6.334285   -2.912567
        _cons |   10.94583   .8788876    12.45   0.000     9.223239    12.66841
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |    .586022   .1463731     4.00   0.000     .2991359    .8729081
      success |   1.160015   .3787677     3.06   0.002     .4176434    1.902386
urbpercbefrev |  -.0297588   .0119316    -2.49   0.013    -.0531443   -.0063734
        _cons |   7.806611   .6728823    11.60   0.000     6.487786    9.125436
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8337425   .0635795    13.11   0.000     .7091289     .958356
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6048497     .07361     8.22   0.000     .4605767    .7491227
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0707324   .4592292     0.15   0.878    -.8293403    .9708051
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.152523   312.2687     0.02   0.982    -604.8829     619.188
--------------+----------------------------------------------------------------
       sigma0 |   2.301917   .1463548                       2.03222    2.607407
       sigma1 |   1.830977   .1347783                      1.584988    2.115144
       theta0 |   1.073294   .4928879                       .436337    2.640069
       theta1 |   .9999988   .0007656                            -1           1
         tau0 |  -.3492324   .1043686                     -.5689719   -.1790955
         tau1 |  -.2222219   .0001701                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    9.573 with p-value  0.0052
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder newpolitymin1 newgd
> ppcthl newlnoill diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899 & e(sample), select (civilwar =  urbandum ethnicorder leftist newlnoi
> ll diamonddum) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        228         .  -564.9988      20    1169.998   1238.584
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. *       RESULT:  Model 3 is preferred
. 
. * Testing explanatory power of model 3
. probit civilwar urbandum leftist ethnicorder if startyear>1899

Iteration 0:   log likelihood = -237.71304  
Iteration 1:   log likelihood = -136.18856  
Iteration 2:   log likelihood = -134.62854  
Iteration 3:   log likelihood = -134.62728  
Iteration 4:   log likelihood = -134.62728  

Probit regression                               Number of obs     =        343
                                                LR chi2(3)        =     206.17
                                                Prob > chi2       =     0.0000
Log likelihood = -134.62728                     Pseudo R2         =     0.4337

------------------------------------------------------------------------------
    civilwar |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    urbandum |  -2.109089   .1737072   -12.14   0.000    -2.449549    -1.76863
     leftist |   .4282028   .2029211     2.11   0.035     .0304847    .8259208
 ethnicorder |   .9268399   .2493647     3.72   0.000     .4380941    1.415586
       _cons |   .9159639    .141563     6.47   0.000     .6385055    1.193422
------------------------------------------------------------------------------

. estat classification

Probit model for civilwar

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |       144            21  |        165
     -     |        30           148  |        178
-----------+--------------------------+-----------
   Total   |       174           169  |        343

Classified + if predicted Pr(D) >= .5
True D defined as civilwar != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   82.76%
Specificity                     Pr( -|~D)   87.57%
Positive predictive value       Pr( D| +)   87.27%
Negative predictive value       Pr(~D| -)   83.15%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   12.43%
False - rate for true D         Pr( -| D)   17.24%
False + rate for classified +   Pr(~D| +)   12.73%
False - rate for classified -   Pr( D| -)   16.85%
--------------------------------------------------
Correctly classified                        85.13%
--------------------------------------------------

. lroc , nograph

Probit model for civilwar

number of observations =      343
area under ROC curve   =   0.8917

. 
. * ========================================
. * EVALUATING IMPACT OF SELECTION PROCESSES
. * ========================================
. * ======================================================
. * CALCULATE SELECTION EFFECT OF URBAN/RURAL LOCATION ON 
. *    DEATHS IN CIVIL WARS AFTER COLD WAR
. * ======================================================
. * Run basic switching regression model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. 
. * Obtain marginal probabilities of selection into civil war for urban episodes
. margins, atmeans expression(predict(psel)) at(urbandum=(0 1)) post

Adjusted predictions                            Number of obs     =        230
Model VCE    : OIM

Expression   : predict(psel)

1._at        : urbandum        =           0
               leftist         =    .2608696 (mean)
               ethnicorder     =    .2086957 (mean)
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

2._at        : urbandum        =           1
               leftist         =    .2608696 (mean)
               ethnicorder     =    .2086957 (mean)
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .8736306   .0414193    21.09   0.000     .7924503     .954811
          2  |   .1428238   .0311748     4.58   0.000     .0817223    .2039252
------------------------------------------------------------------------------

. * Prob of not-urban-civic episode turning into civil war
. scalar m1 = el(r(b),1,1)

. * Prob of urban episode turning into civil war
. scalar m2 = el(r(b),1,2)

. * Prob of not-urban episode not involving civil war
. scalar m3 = 1 - m1

. * Prob of urban episode not involving civil war
. scalar m4 = 1 - m2

. display m1 " " m3 " " m2 " " m4
.87363063 .12636937 .14282376 .85717624

. 
. * Obtain number of urban and not-urban episodes for Cold War and post-Cold War periods
. * Cold War and Post-Cold War urban episodes
. tabstat urbandum if startyear>1899 & urbandum==1, s(count) by(timeperiods) nototal save

Summary for variables: urbandum
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |        58
  1950-1984 |        40
  1985-2014 |        82
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numurbcold = urbtotal1[1,1]

. scalar numurbpost = urbtotal2[1,1]

. display numurbcold  " " numurbpost 
40 82

. scalar urbdiff = numurbpost - numurbcold  

. display urbdiff
42

. * Cold War and Post-Cold War not-urban episodes
. tabstat urbandum if startyear>1899 & urbandum==0, s(count) by(timeperiods) nototal save

Summary for variables: urbandum
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |        64
  1950-1984 |        58
  1985-2014 |        41
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numnourbcold = urbtotal1[1,1]

. scalar numnourbpost = urbtotal2[1,1]

. display numnourbcold  " " numnourbpost 
58 41

. scalar nourbdiff = numnourbpost - numnourbcold  

. display nourbdiff
-17

. 
. * Obtain differences in average deaths for urban and not-urban episodes involving and not involving civil war
. * Average deaths in urban episodes with civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==1, s(mean) by(urbandum) save nototal

Summary for variables: totaldeaths
     by categories of: urbandum (Episode occurred primarily in an urban setting)

urbandum |      mean
---------+----------
      no |  142529.1
     yes |   39465.4
--------------------

. * Not-urban
. mat total3 = r(Stat1)

. local  newtot3 = total3[1,1]

. scalar nourbcivdeaths = `newtot3'

. * Urban 
. mat total4 = r(Stat2)

. local  newtot4 = total4[1,1]

. scalar urbcivdeaths = `newtot4'

. display nourbcivdeaths " " urbcivdeaths
142529.11 39465.4

. scalar civdeathsdiff =  urbcivdeaths - nourbcivdeaths 

. display civdeathsdiff 
-103063.71

. * Average deaths in urban episodes without civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==0, s(mean) by(urbandum) save nototal

Summary for variables: totaldeaths
     by categories of: urbandum (Episode occurred primarily in an urban setting)

urbandum |      mean
---------+----------
      no |    2025.2
     yes |     746.7
--------------------

. * Not-urban
. mat total5 = r(Stat1)

. local  newtot5 = total5[1,1]

. scalar nourbnocivdeaths = `newtot5'

. * Urban
. mat total6 = r(Stat2)

. local  newtot6 = total6[1,1]

. scalar urbnocivdeaths = `newtot6'

. display nourbnocivdeaths " " urbnocivdeaths
2025.2 746.7

. scalar nocivdeathsdiff =  urbnocivdeaths - nourbnocivdeaths 

. display nocivdeathsdiff 
-1278.5

. 
. * Calculate increase/decrease in deaths as a result of selection into and out of civil war
. * Increase/decrease in post-Cold War period in # deaths in urban episodes that selected into civil war
. scalar a1 = (m2 * urbdiff * civdeathsdiff) 

. if urbdiff < 0 & civdeathsdiff < 0 {
.         scalar a1 = -1 * a1
.         }

. display a1
-618237.78

. * Increase/decrease in post-Cold War period in # deaths in urban episodes that selected out of civil war
. scalar a2 = (m4 * urbdiff * nocivdeathsdiff) 

. if urbdiff < 0 & nocivdeathsdiff < 0 {
.         scalar a2 = -1 * a2
.         }

. display a2
-46027.792

. scalar totaleffect = a1 + a2 

. display "The estimated effect on the number of deaths is " totaleffect
The estimated effect on the number of deaths is -664265.57

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ============================================================
. * CALCULATE SELECTION EFFECT OF SOCIAL REVOLUTIONARY EPISODES 
. *    ON DEATHS IN CIVIL WARS
. * ============================================================
. * Run basic switching regression model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. 
. * Obtain marginal probabilities of selection into civil war for social revolutionary episodes
. margins, atmeans expression(predict(psel)) at(leftist=(0 1)) post

Adjusted predictions                            Number of obs     =        230
Model VCE    : OIM

Expression   : predict(psel)

1._at        : urbandum        =    .6521739 (mean)
               leftist         =           0
               ethnicorder     =    .2086957 (mean)
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

2._at        : urbandum        =    .6521739 (mean)
               leftist         =           1
               ethnicorder     =    .2086957 (mean)
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .3287026   .0502316     6.54   0.000     .2302505    .4271548
          2  |   .5446858   .0726432     7.50   0.000     .4023078    .6870638
------------------------------------------------------------------------------

. * Prob of not-leftist episode turning into civil war
. scalar m1 = el(r(b),1,1)

. * Prob of leftist episode turning into civil war
. scalar m2 = el(r(b),1,2)

. * Prob of not-leftist episode not involving civil war
. scalar m3 = 1 - m1

. * Prob of leftist not involving civil war
. scalar m4 = 1 - m2

. display m1 " " m3 " " m2 " " m4
.32870263 .67129737 .54468576 .45531424

. 
. * Obtain number of social revolutionary and not-social-revolutionary episodes for Cold War and post-Cold War per
> iods
. * Cold War and Post-Cold War social revolutionary episodes
. tabstat leftist if startyear>1899 & leftist==1, s(count) by(timeperiods) nototal save

Summary for variables: leftist
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |        31
  1950-1984 |        44
  1985-2014 |         5
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numurbcold = urbtotal1[1,1]

. scalar numurbpost = urbtotal2[1,1]

. display numurbcold  " " numurbpost 
44 5

. scalar urbdiff = numurbpost - numurbcold  

. display urbdiff
-39

. * Cold War and Post-Cold War not-social revolutionary episodes
. tabstat leftist if startyear>1899 & leftist==0, s(count) by(timeperiods) nototal save

Summary for variables: leftist
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |        91
  1950-1984 |        54
  1985-2014 |       118
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numnourbcold = urbtotal1[1,1]

. scalar numnourbpost = urbtotal2[1,1]

. display numnourbcold  " " numnourbpost 
54 118

. scalar nourbdiff = numnourbpost - numnourbcold  

. display nourbdiff
64

. 
. * Obtain differences in average deaths for social revolutionary and not-social-revolutionary episodes involving 
> and not involving civil war
. * Average deaths in revolutionary episodes with civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==1, s(mean) by(leftist) save nototal

Summary for variables: totaldeaths
     by categories of: leftist (Goal: social revolutionary (aimed at transformation of class structure))

leftist |      mean
--------+----------
     no |  149331.1
    yes |  69254.26
-------------------

. * Not-leftist
. mat total3 = r(Stat1)

. local  newtot3 = total3[1,1]

. scalar nourbcivdeaths = `newtot3'

. * Leftist
. mat total4 = r(Stat2)

. local  newtot4 = total4[1,1]

. scalar urbcivdeaths = `newtot4'

. display nourbcivdeaths " " urbcivdeaths
149331.08 69254.257

. scalar civdeathsdiff =  urbcivdeaths - nourbcivdeaths 

. display civdeathsdiff 
-80076.824

. * Average deaths in revolutionary episodes without civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==0, s(mean) by(leftist) save nototal

Summary for variables: totaldeaths
     by categories of: leftist (Goal: social revolutionary (aimed at transformation of class structure))

leftist |      mean
--------+----------
     no |  760.9462
    yes |      1169
-------------------

. * Not leftist
. mat total5 = r(Stat1)

. local  newtot5 = total5[1,1]

. scalar nourbnocivdeaths = `newtot5'

. * Leftist
. mat total6 = r(Stat2)

. local  newtot6 = total6[1,1]

. scalar urbnocivdeaths = `newtot6'

. display nourbnocivdeaths " " urbnocivdeaths
760.94624 1169

. scalar nocivdeathsdiff =  urbnocivdeaths - nourbnocivdeaths 

. display nocivdeathsdiff 
408.05376

. 
. * Calculate increase/decrease in deaths as a result of selection into and out of civil war
. * Increase/decrease in post-Cold War period in # deaths in social revolutionary episodes that selected into civi
> l war
. scalar a1 = (m2 * urbdiff * civdeathsdiff) 

. if urbdiff < 0 & civdeathsdiff < 0 {
.         scalar a1 = -1 * a1
.         }

. display a1
-1701051.5

. * Increase/decrease in post-Cold War period in # deaths in social revolutionary episodes that selected out of ci
> vil war
. scalar a2 = (m4 * urbdiff * nocivdeathsdiff) 

. if urbdiff < 0 & nocivdeathsdiff < 0 {
.         scalar a2 = -1 * a2
.         }

. display a2
-7245.9149

. scalar totaleffect = a1 + a2 

. display "The estimated effect on the number of deaths is " totaleffect
The estimated effect on the number of deaths is -1708297.4

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * =========================================================
. * CALCULATE SELECTION EFFECT OF EPISODES AIMED AT ALTERING 
. *    ETHNIC/RACIAL ORDER ON DEATHS IN CIVIL WARS
. * =========================================================
. * Run basic switching regression model
. quietly: switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lndeaths =  lnmonthsdu
> r success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. 
. * Obtain marginal probabilities of selection into civil war for ethnic/racial episodes
. margins, atmeans expression(predict(psel)) at(ethnicorder=(0 1)) post

Adjusted predictions                            Number of obs     =        230
Model VCE    : OIM

Expression   : predict(psel)

1._at        : urbandum        =    .6521739 (mean)
               leftist         =    .2608696 (mean)
               ethnicorder     =           0
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

2._at        : urbandum        =    .6521739 (mean)
               leftist         =    .2608696 (mean)
               ethnicorder     =           1
               success         =    .4652174 (mean)
               newpolitym~1    =   -1.378261 (mean)
               urbancivic      =    .2304348 (mean)
               newgdppcthl     =    2.926846 (mean)
               lnmonthsdur     =    2.380064 (mean)
               urbpercbef~v    =    23.50577 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .2704812   .0432107     6.26   0.000     .1857897    .3551727
          2  |   .8126356   .0630449    12.89   0.000     .6890699    .9362012
------------------------------------------------------------------------------

. * Prob of not-ethnic/racial episode turning into civil war
. scalar m1 = el(r(b),1,1)

. * Prob of ethnic/racial episode turning into civil war
. scalar m2 = el(r(b),1,2)

. * Prob of not-ethnic/racial episode not involving civil war
. scalar m3 = 1 - m1

. * Prob of ethnic/racial episode not involving civil war
. scalar m4 = 1 - m2

. display m1 " " m3 " " m2 " " m4
.27048122 .72951878 .81263557 .18736443

. 
. * Obtain number of ethnic/racial and not-ethnic/racial episodes for Cold War and post-Cold War periods
. * Cold War and Post-Cold War ethnic/racial episodes
. tabstat ethnicorder if startyear>1899 & ethnicorder==1, s(count) by(timeperiods) nototal save

Summary for variables: ethnicorder
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |         4
  1950-1984 |        19
  1985-2014 |        33
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numurbcold = urbtotal1[1,1]

. scalar numurbpost = urbtotal2[1,1]

. display numurbcold  " " numurbpost 
19 33

. scalar urbdiff = numurbpost - numurbcold  

. display urbdiff
14

. * Cold War and Post-Cold War not-ethnic/racial episodes
. tabstat ethnicorder if startyear>1899 & ethnicorder==0, s(count) by(timeperiods) nototal save

Summary for variables: ethnicorder
     by categories of: timeperiods (Time period)

timeperiods |         N
------------+----------
  1900-1949 |       118
  1950-1984 |        79
  1985-2014 |        90
-----------------------

. mat urbtotal1 = r(Stat2)

. mat urbtotal2 = r(Stat3)

. scalar numnourbcold = urbtotal1[1,1]

. scalar numnourbpost = urbtotal2[1,1]

. display numnourbcold  " " numnourbpost 
79 90

. scalar nourbdiff = numnourbpost - numnourbcold  

. display nourbdiff
11

. 
. * Obtain differences in average deaths for ethnic/racial and not-ethnic/racial revolutionary episodes involving 
> and not involving civil war
. * Average deaths in revolutionary episodes with civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==1, s(mean) by(ethnicorder) save nototal

Summary for variables: totaldeaths
     by categories of: ethnicorder (Goal: ethnic stratification (reverse ethnic/racial domination))

ethnicorder |      mean
------------+----------
         no |  104883.3
        yes |  153505.3
-----------------------

. * Not-ethnic/racial order
. mat total3 = r(Stat1)

. local  newtot3 = total3[1,1]

. scalar nourbcivdeaths = `newtot3'

. * Ethnic/racial order
. mat total4 = r(Stat2)

. local  newtot4 = total4[1,1]

. scalar urbcivdeaths = `newtot4'

. display nourbcivdeaths " " urbcivdeaths
104883.25 153505.26

. scalar civdeathsdiff =  urbcivdeaths - nourbcivdeaths 

. display civdeathsdiff 
48622.008

. * Average deaths in revolutionary episodes without civil war
. tabstat totaldeaths if  startyear>1949 & civilwar==0, s(mean) by(ethnicorder) save nototal

Summary for variables: totaldeaths
     by categories of: ethnicorder (Goal: ethnic stratification (reverse ethnic/racial domination))

ethnicorder |      mean
------------+----------
         no |  550.3895
        yes |    3250.9
-----------------------

. * Not ethnic/racial order
. mat total5 = r(Stat1)

. local  newtot5 = total5[1,1]

. scalar nourbnocivdeaths = `newtot5'

. * Ethnic/racial order
. mat total6 = r(Stat2)

. local  newtot6 = total6[1,1]

. scalar urbnocivdeaths = `newtot6'

. display nourbnocivdeaths " " urbnocivdeaths
550.38947 3250.9

. scalar nocivdeathsdiff =  urbnocivdeaths - nourbnocivdeaths 

. display nocivdeathsdiff 
2700.5105

. 
. * Calculate increase/decrease in deaths as a result of selection into and out of civil war
. * Increase/decrease in post-Cold War period in # deaths in ethnic/racial revolutionary episodes that selected in
> to civil war
. scalar a1 = (m2 * urbdiff * civdeathsdiff) 

. if urbdiff < 0 & civdeathsdiff < 0 {
.         scalar a1 = -1 * a1
.         }

. display a1
553167.63

. * Increase/decrease in post-Cold War period in # deaths in ethnic/racial revolutionary episodes that selected ou
> t of civil war
. scalar a2 = (m4 * urbdiff * nocivdeathsdiff) 

. if urbdiff < 0 & nocivdeathsdiff < 0 {
.         scalar a2 = -1 * a2
.         }

. display a2
7083.7147

. scalar totaleffect = a1 + a2 

. display "The estimated effect on the number of deaths is " totaleffect
The estimated effect on the number of deaths is 560251.34

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. 
. * ++++++++++++++++++++++++++++++++++++++++
. * NO CIVIL WAR PORTION OF SWITCHING MODEL
. * ++++++++++++++++++++++++++++++++++++++++
. * =========================================================================
. * SWITCHING REG: CHOOSING SPECIFICATIONS FOR NO CIVIL WAR REGIME--TABLE 8.4
. * =========================================================================
. * Model 1
. switchcopula (lndeaths = urbandum ) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (c
> ivilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(n
> ormal)

Iteration 0:   log likelihood = -640.25232  (not concave)
Iteration 1:   log likelihood = -633.27418  
Iteration 2:   log likelihood = -630.96158  
Iteration 3:   log likelihood = -630.19078  
Iteration 4:   log likelihood =  -630.1634  
Iteration 5:   log likelihood = -630.16311  
Iteration 6:   log likelihood = -630.16311  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        241
                                                Wald chi2(3)      =     106.10
Log likelihood = -630.16311                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.189948   .2337257    -9.37   0.000    -2.648042   -1.731854
      leftist |   .4788226   .2340542     2.05   0.041     .0200847    .9375605
  ethnicorder |   1.300177   .2656692     4.89   0.000     .7794751    1.820879
        _cons |   .7798288   .2209713     3.53   0.000     .3467329    1.212925
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -6.529927   1.644982    -3.97   0.000    -9.754033   -3.305821
        _cons |   10.51141   1.718322     6.12   0.000     7.143562    13.87926
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .6534501   .1501023     4.35   0.000      .359255    .9476451
urbpercbefrev |  -.0243676   .0112831    -2.16   0.031    -.0464821   -.0022532
      success |   1.244602   .3857886     3.23   0.001     .4884704    2.000734
        _cons |   7.386477   .7121128    10.37   0.000     5.990761    8.782192
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   1.001515   .0646344    15.50   0.000     .8748342    1.128197
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6442776   .0712223     9.05   0.000     .5046844    .7838708
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.2578113   .9179883    -0.28   0.779    -2.057035    1.541413
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   1.060998   .9730221     1.09   0.276      -.84609    2.968087
--------------+----------------------------------------------------------------
       sigma0 |   2.722404   .1759611                      2.398478    3.090079
       sigma1 |   1.904611   .1356508                      1.656463    2.189933
       theta0 |   .7727411   .7093672                      .1278324    4.671184
       theta1 |   .7860456   .3718231                     -.6890213    .9947297
         tau0 |  -.2786921   .1845366                     -.7002032   -.0600764
         tau1 |  -.1746768   .0826274                      -.221051    .1531158
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    2.504 with p-value  0.1998
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum ) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899 &
>  e(sample), select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) marg
> in0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -582.4224      13    1190.845   1235.369
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 2
. switchcopula (lndeaths = urbandum urbancivic) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899,
>  select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal)
>  margsel(normal)

Iteration 0:   log likelihood = -630.74772  
Iteration 1:   log likelihood = -626.34909  (backed up)
Iteration 2:   log likelihood = -621.69607  
Iteration 3:   log likelihood = -621.09563  
Iteration 4:   log likelihood = -621.07168  
Iteration 5:   log likelihood = -621.07122  
Iteration 6:   log likelihood = -621.07122  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        241
                                                Wald chi2(3)      =     106.50
Log likelihood = -621.07122                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.172607   .2324663    -9.35   0.000    -2.628233   -1.716982
      leftist |   .5285896   .2316901     2.28   0.023     .0744852    .9826939
  ethnicorder |   1.330061   .2698723     4.93   0.000     .8011214    1.859001
        _cons |   .7518284   .2187294     3.44   0.001     .3231267     1.18053
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -5.298955   1.603162    -3.31   0.001    -8.441094   -2.156815
   urbancivic |  -2.009548   .4573287    -4.39   0.000    -2.905896     -1.1132
        _cons |   10.05126   1.659135     6.06   0.000      6.79941     13.3031
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .6550287   .1502814     4.36   0.000     .3604826    .9495748
urbpercbefrev |  -.0243322   .0112786    -2.16   0.031    -.0464378   -.0022266
      success |   1.245977   .3857109     3.23   0.001     .4899976    2.001957
        _cons |   7.377307   .7132118    10.34   0.000     5.979437    8.775176
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |    .935742   .0628673    14.88   0.000     .8125244     1.05896
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6443235   .0712452     9.04   0.000     .5046855    .7839616
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.4064792   .9237488    -0.44   0.660    -2.216994    1.404035
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   1.081652   .9923552     1.09   0.276    -.8633289    3.026632
--------------+----------------------------------------------------------------
       sigma0 |   2.549104   .1602552                       2.25359     2.88337
       sigma1 |   1.904698   .1357006                      1.656464    2.190132
       theta0 |    .665991   .6152083                      .1089361    4.071597
       theta1 |   .7938108   .3670369                     -.6979688    .9953107
         tau0 |  -.2498099   .1731151                     -.6705973   -.0516545
         tau1 |  -.1764024   .0815638                     -.2211801    .1551042
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    3.456 with p-value  0.1204
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic) (lndeaths =  lnmonthsdur urbpercbefrev success) if starty
> ear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(no
> rmal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -573.3329      15    1176.666    1228.04
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 3
. switchcopula (lndeaths = urbandum urbancivic success) (lndeaths =  lnmonthsdur urbpercbefrev success) if startye
> ar>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) margin0
> (normal) margsel(normal)

Iteration 0:   log likelihood =  -627.8762  
Iteration 1:   log likelihood = -626.46182  
Iteration 2:   log likelihood = -619.29434  
Iteration 3:   log likelihood = -618.50777  
Iteration 4:   log likelihood = -618.48325  
Iteration 5:   log likelihood = -618.48304  
Iteration 6:   log likelihood = -618.48304  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        241
                                                Wald chi2(3)      =     106.80
Log likelihood = -618.48304                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.170412   .2318514    -9.36   0.000    -2.624832   -1.715992
      leftist |   .5491197   .2296601     2.39   0.017     .0989941    .9992453
  ethnicorder |   1.345403   .2710138     4.96   0.000     .8142252     1.87658
        _cons |   .7427776   .2175002     3.42   0.001      .316485     1.16907
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -4.814198   1.368787    -3.52   0.000    -7.496972   -2.131425
   urbancivic |  -1.879295   .4525475    -4.15   0.000    -2.766272    -.992318
      success |  -1.009593   .4399552    -2.29   0.022    -1.871889   -.1472963
        _cons |   10.05162   1.396154     7.20   0.000     7.315212    12.78803
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .6556418   .1503483     4.36   0.000     .3609645     .950319
urbpercbefrev |  -.0243193   .0112773    -2.16   0.031    -.0464223   -.0022162
      success |   1.246472   .3856802     3.23   0.001     .4905526    2.002391
        _cons |   7.374125    .713559    10.33   0.000     5.975575    8.772675
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .9178582   .0616588    14.89   0.000     .7970091    1.038707
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6443262   .0712507     9.04   0.000     .5046774    .7839749
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.4125732   .7791047    -0.53   0.596     -1.93959    1.114444
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   1.088697   .9979176     1.09   0.275    -.8671854     3.04458
--------------+----------------------------------------------------------------
       sigma0 |   2.503922   .1543889                      2.218895    2.825562
       sigma1 |   1.904703   .1357114                      1.656451    2.190161
       theta0 |   .6619447   .5157242                      .1437628    3.047873
       theta1 |   .7964021    .364982                     -.6999413    .9954756
         tau0 |  -.2486696   .1455625                     -.6037935    -.067061
         tau1 |  -.1769783   .0811071                     -.2212168    .1555425
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    4.198 with p-value  0.0815
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic success) (lndeaths =  lnmonthsdur urbpercbefrev success) i
> f startyear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) ma
> rgin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -570.7211      16    1173.442   1228.241
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 4
. switchcopula (lndeaths = urbandum urbancivic success newpolitymin1) (lndeaths =  lnmonthsdur urbpercbefrev succe
> ss) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fgm) margin1(n
> ormal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -597.60281  (not concave)
Iteration 1:   log likelihood = -591.91913  
Iteration 2:   log likelihood = -589.67677  
Iteration 3:   log likelihood = -588.94437  
Iteration 4:   log likelihood = -588.93892  
Iteration 5:   log likelihood = -588.93892  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        233
                                                Wald chi2(3)      =     103.36
Log likelihood = -588.93892                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.178398   .2359581    -9.23   0.000    -2.640868   -1.715929
      leftist |   .4754083     .23097     2.06   0.040     .0227153    .9281012
  ethnicorder |   1.356606   .2693772     5.04   0.000     .8286364    1.884576
        _cons |   .7527998   .2205227     3.41   0.001     .3205832    1.185016
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -4.615333   1.007436    -4.58   0.000    -6.589871   -2.640795
   urbancivic |  -2.031302   .4331972    -4.69   0.000    -2.880353   -1.182252
      success |  -1.490966   .4377787    -3.41   0.001    -2.348996   -.6329351
newpolitymin1 |  -.1210476   .0357172    -3.39   0.001    -.1910521   -.0510431
        _cons |   10.06967   .9916041    10.15   0.000     8.126165    12.01318
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .6885761   .1492242     4.61   0.000      .396102    .9810501
urbpercbefrev |   -.025074   .0123116    -2.04   0.042    -.0492042   -.0009438
      success |   1.184936    .389571     3.04   0.002     .4213907    1.948481
        _cons |   7.269801   .7087074    10.26   0.000      5.88076    8.658842
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8623463   .0626759    13.76   0.000     .7395039    .9851888
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6271011   .0729751     8.59   0.000     .4840726    .7701296
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.1702781   .5543736    -0.31   0.759     -1.25683    .9162741
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   .9679938   .9279932     1.04   0.297    -.8508395    2.786827
--------------+----------------------------------------------------------------
       sigma0 |   2.368712   .1484611                      2.094896    2.678318
       sigma1 |   1.872175   .1366221                      1.622669    2.160046
       theta0 |   .8434302   .4675754                      .2845545    2.499959
       theta1 |   .7478213   .4090253                     -.6915078    .9924356
         tau0 |  -.2966242   .1156636                     -.5555515   -.1245558
         tau1 |  -.1661825   .0908945                     -.2205412    .1536684
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    4.615 with p-value  0.0656
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1) (lndeaths =  lnmonthsdur urbpercbef
> rev success) if startyear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -564.7449      17     1163.49   1221.714
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 5
. switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdur urbperc
> befrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) copula1(fg
> m) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -580.06379  (not concave)
Iteration 1:   log likelihood = -574.09006  (not concave)
Iteration 2:   log likelihood = -573.25352  
Iteration 3:   log likelihood = -570.39348  
Iteration 4:   log likelihood = -569.95645  
Iteration 5:   log likelihood = -569.94319  
Iteration 6:   log likelihood = -569.94048  
Iteration 7:   log likelihood =  -569.9399  
Iteration 8:   log likelihood = -569.93977  
Iteration 9:   log likelihood = -569.93973  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     102.08
Log likelihood = -569.93973                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.211441   .2424118    -9.12   0.000    -2.686559   -1.736323
      leftist |   .5557443    .228108     2.44   0.015     .1086609    1.002828
  ethnicorder |   1.499009   .2691029     5.57   0.000     .9715766    2.026441
        _cons |   .6859092    .223242     3.07   0.002      .248363    1.123455
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -4.682154   .8777555    -5.33   0.000    -6.402523   -2.961785
   urbancivic |  -1.681998   .4300323    -3.91   0.000    -2.524846   -.8391503
      success |  -1.647397   .4243601    -3.88   0.000    -2.479128    -.815667
newpolitymin1 |  -.1013102    .034569    -2.93   0.003    -.1690641   -.0335563
  newgdppcthl |  -.2261862   .0623702    -3.63   0.000    -.3484296   -.1039428
        _cons |   10.96281   .8876303    12.35   0.000      9.22309    12.70254
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766471   .1454606     3.96   0.000     .2915495    .8617447
urbpercbefrev |   -.029129   .0119571    -2.44   0.015    -.0525644   -.0056935
      success |   1.177386   .3773174     3.12   0.002     .4378579    1.916915
        _cons |   7.813654   .6699743    11.66   0.000     6.500528    9.126779
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8296942   .0632792    13.11   0.000     .7056692    .9537192
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6029933   .0733354     8.22   0.000     .4592585    .7467281
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .0372386   .4810265     0.08   0.938    -.9055561    .9800333
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.474985   181.2116     0.04   0.971    -348.6931    361.6431
--------------+----------------------------------------------------------------
       sigma0 |   2.292617    .145075                      2.025201    2.595344
       sigma1 |   1.827581   .1340264                        1.5829    2.110085
       theta0 |   1.037941    .499277                       .404317    2.664545
       theta1 |   .9999952   .0017224                            -1           1
         tau0 |  -.3416593   .1081964                     -.5712336   -.1681629
         tau1 |  -.2222212   .0003828                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.283 with p-value  0.0100
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder) copula
> 0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -560.0012      18    1156.002   1217.651
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 6
. switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl leftist) (lndeaths =  lnmonthsdur
>  urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) co
> pula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -579.40031  (not concave)
Iteration 1:   log likelihood = -573.51514  (not concave)
Iteration 2:   log likelihood = -572.99309  
Iteration 3:   log likelihood =  -570.1507  
Iteration 4:   log likelihood = -568.83437  
Iteration 5:   log likelihood = -568.81318  
Iteration 6:   log likelihood = -568.80895  
Iteration 7:   log likelihood = -568.80803  
Iteration 8:   log likelihood = -568.80781  
Iteration 9:   log likelihood = -568.80777  
Iteration 10:  log likelihood = -568.80775  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        230
                                                Wald chi2(3)      =     103.53
Log likelihood = -568.80775                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |  -2.197688   .2411588    -9.11   0.000    -2.670351   -1.725026
      leftist |   .6471254   .2349486     2.75   0.006     .1866345    1.107616
  ethnicorder |   1.491593   .2633214     5.66   0.000     .9754925    2.007693
        _cons |   .6521023   .2212834     2.95   0.003     .2183947     1.08581
--------------+----------------------------------------------------------------
regime0       |
     urbandum |  -4.622375   .8192492    -5.64   0.000    -6.228074   -3.016676
   urbancivic |  -1.486834   .4486787    -3.31   0.001    -2.366228   -.6074401
      success |   -1.53429   .4309448    -3.56   0.000    -2.378927   -.6896541
newpolitymin1 |  -.1034693   .0344136    -3.01   0.003    -.1709187   -.0360199
  newgdppcthl |  -.2219473   .0616985    -3.60   0.000    -.3428742   -.1010204
      leftist |   .8551926   .5664057     1.51   0.131    -.2549421    1.965327
        _cons |   10.61973   .8509513    12.48   0.000     8.951898    12.28757
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5796782   .1454215     3.99   0.000     .2946573     .864699
urbpercbefrev |  -.0290959   .0119516    -2.43   0.015    -.0525206   -.0056712
      success |   1.177831   .3771178     3.12   0.002     .4386941    1.916969
        _cons |   7.800897   .6699539    11.64   0.000     6.487812    9.113983
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |    .831017   .0638223    13.02   0.000     .7059277    .9561064
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6027624   .0733216     8.22   0.000     .4590547    .7464701
--------------+----------------------------------------------------------------
atheta0       |
        _cons |   .1858219    .441392     0.42   0.674    -.6792905    1.050934
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   7.684883    600.525     0.01   0.990    -1169.322    1184.692
--------------+----------------------------------------------------------------
       sigma0 |   2.295652   .1465137                      2.025725    2.601547
       sigma1 |   1.827159   .1339702                      1.582577     2.10954
       theta0 |   1.204208   .5315276                      .5069765    2.860322
       theta1 |   .9999996   .0005077                            -1           1
         tau0 |  -.3758207   .1035415                     -.5885046   -.2022263
         tau1 |  -.2222221   .0001128                     -.2222222    .2222222
-------------------------------------------------------------------------------
LR test of independence :        Test statistic    9.765 with p-value  0.0047
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl leftist) (lndeaths =  ln
> monthsdur urbpercbefrev success) if startyear>1899 & e(sample), select (civilwar =  urbandum leftist ethnicorder
> ) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -558.5334      19    1155.067   1220.141
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. * Model 7
. switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyear) (lndea
> ths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) c
> opula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

Iteration 0:   log likelihood = -569.03382  (not concave)
Iteration 1:   log likelihood = -563.20923  
Iteration 2:   log likelihood = -561.66123  
Iteration 3:   log likelihood = -559.33374  
Iteration 4:   log likelihood = -559.18513  
Iteration 5:   log likelihood = -559.15324  
Iteration 6:   log likelihood = -559.14575  
Iteration 7:   log likelihood = -559.14395  
Iteration 8:   log likelihood = -559.14355  
Iteration 9:   log likelihood = -559.14346  
Iteration 10:  log likelihood = -559.14345  

Swithching Regression: Copulas clayton-fgm, Margins probit-normal-normal

                                                Number of obs     =        227
                                                Wald chi2(3)      =     100.80
Log likelihood = -559.14345                     Prob > chi2       =     0.0000

---------------------------------------------------------------------------------
                |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
select          |
       urbandum |  -2.247374   .2466192    -9.11   0.000    -2.730738   -1.764009
        leftist |   .5491296   .2331051     2.36   0.018      .092252    1.006007
    ethnicorder |   1.499412    .273831     5.48   0.000     .9627133    2.036111
          _cons |   .7346363   .2290695     3.21   0.001     .2856684    1.183604
----------------+----------------------------------------------------------------
regime0         |
       urbandum |  -4.941765   .9429925    -5.24   0.000    -6.789996   -3.093534
     urbancivic |  -1.820599   .4871386    -3.74   0.000    -2.775374   -.8658251
        success |  -1.595497   .4187593    -3.81   0.000     -2.41625   -.7747437
  newpolitymin1 |  -.1034771   .0378895    -2.73   0.006    -.1777392    -.029215
    newgdppcthl |  -.2308075   .0724475    -3.19   0.001    -.3728019   -.0888131
humanrightsrats |  -.2028939   .2084048    -0.97   0.330    -.6113598     .205572
      startyear |    .011453   .0089377     1.28   0.200    -.0060646    .0289706
          _cons |  -11.19346    17.3036    -0.65   0.518    -45.10789    22.72097
----------------+----------------------------------------------------------------
regime1         |
    lnmonthsdur |   .5764989   .1455173     3.96   0.000     .2912901    .8617076
  urbpercbefrev |  -.0292148   .0119617    -2.44   0.015    -.0526592   -.0057704
        success |   1.175816   .3774014     3.12   0.002      .436123    1.915509
          _cons |   7.822755   .6702996    11.67   0.000     6.508991    9.136518
----------------+----------------------------------------------------------------
lnsigma0        |
          _cons |   .8085182   .0636313    12.71   0.000     .6838031    .9332333
----------------+----------------------------------------------------------------
lnsigma1        |
          _cons |   .6027265   .0733146     8.22   0.000     .4590326    .7464204
----------------+----------------------------------------------------------------
atheta0         |
          _cons |  -.0613603   .4944902    -0.12   0.901    -1.030543    .9078227
----------------+----------------------------------------------------------------
atheta1         |
          _cons |   7.166537   364.5857     0.02   0.984    -707.4082    721.7413
----------------+----------------------------------------------------------------
         sigma0 |   2.244579   .1428256                      1.981399    2.542717
         sigma1 |   1.827094   .1339526                      1.582542    2.109435
         theta0 |   .9404843   .4650603                       .356813    2.478919
         theta1 |   .9999988   .0008691                            -1           1
           tau0 |  -.3198399   .1075726                     -.5534637   -.1513964
           tau1 |   -.222222   .0001931                     -.2222222    .2222222
---------------------------------------------------------------------------------
LR test of independence :        Test statistic    8.431 with p-value  0.0092
------------------------------------------------------------------------------

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethni
> corder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl humanrightsrats startyea
> r) (lndeaths =  lnmonthsdur urbpercbefrev success) if startyear>1899 & e(sample), select (civilwar =  urbandum l
> eftist ethnicorder) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |        227         .  -559.1434      20    1158.287   1226.786
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. 
. * Likelihood ratio test of Models 5 and 6
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estimates store A

. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl leftist) (lndeaths =  ln
> monthsdur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(cl
> ayton) copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. estimates store B

. lrtest A B

Likelihood-ratio test                                 LR chi2(1)  =      2.26
(Assumption: A nested in B)                           Prob > chi2 =    0.1324

. *       RESULT:  LR chi2(1)=2.26, p=0.1324  Cannot conclude that Model 6 is superior to Model 5 at the .05 level
. drop _est_A _est_B 

. *   RESULT: Model 5 is the preferred model
. 
. * GLM estimation of Model 5
. quietly: switchcopula (lndeaths = urbandum newgdppcthl urbancivic success newpolitymin1) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. glm totaldeaths urbandum newgdppcthl urbancivic success newpolitymin1 if civilwar==0 & startyear>1899 & e(sample
> ), link(log) family(gamma)

Iteration 0:   log likelihood =  -1042.045  
Iteration 1:   log likelihood = -1009.4673  
Iteration 2:   log likelihood = -986.52415  
Iteration 3:   log likelihood = -986.11074  
Iteration 4:   log likelihood =  -986.1093  
Iteration 5:   log likelihood =  -986.1093  

Generalized linear models                         No. of obs      =        137
Optimization     : ML                             Residual df     =        131
                                                  Scale parameter =   5.194879
Deviance         =  488.6435915                   (1/df) Deviance =   3.730104
Pearson          =  680.5291614                   (1/df) Pearson  =   5.194879

Variance function: V(u) = u^2                     [Gamma]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   14.48335
Log likelihood   = -986.1092991                   BIC             =  -155.8739

-------------------------------------------------------------------------------
              |                 OIM
  totaldeaths |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
     urbandum |  -1.706538    .838066    -2.04   0.042    -3.349117   -.0639588
  newgdppcthl |  -.3123443   .0899487    -3.47   0.001    -.4886406    -.136048
   urbancivic |  -1.336458    .450903    -2.96   0.003    -2.220212   -.4527048
      success |  -1.003941   .4597253    -2.18   0.029    -1.904986   -.1028963
newpolitymin1 |  -.0708483   .0337073    -2.10   0.036    -.1369134   -.0047833
        _cons |   9.832824   .8125524    12.10   0.000      8.24025     11.4254
-------------------------------------------------------------------------------

. 
. 
. * ============================================================
. * SWITCHING REG: ESTIMATED EFFECT ON DEATHS OF URBAN LOCATION 
. *    IN EPISODES WITHOUT CIVIL WARS, 1985-2014 vs. 1900-1949 
. * ============================================================
. * Full switching model
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl ) (lndeaths =  lnmonthsd
> ur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) 
> copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat urbandum if civilwar==0 & startyear>1899, s(mean) by(timeperiods) save

Summary for variables: urbandum
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  .7580645
  1950-1984 |    .90625
  1985-2014 |  .9733333
------------+----------
      Total |  .8816568
-----------------------

. mat total1 = r(Stat1)

. mat total3 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
.75806452

. local newtot3 = total3[1,1]

. display `newtot3'
.97333333

. * Reassign var
. local lev1 = `newtot1'

. local lev3 = `newtot3'

. * Calculate marginal effects for success rates for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 3

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb0)+(0.5*(`param2')*(`param2'))))) at(urbandum=(`lev1' `lev3')) subpop
> (if civilwar==0)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =        137
Model VCE    : OIM

Expression   : exp((predict(xb0)+(0.5*(2.292617459269031)*(2.292617459269031))))

1._at        : urbandum        =    .7580645
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

2._at        : urbandum        =    .9733333
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   2732.863   756.9062     3.61   0.000     1249.354    4216.372
          2  |   997.4312   208.4587     4.78   0.000     588.8597    1406.003
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m3 = el(r(b),1,2)

. * Calculate effect: Multiply effect times number of non-civil-war episodes in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar ncwnum1 = tper[1,1]

. scalar ncwnum3 = tper[3,1]

. display ncwnum1
62

. display ncwnum3
75

. scalar effper1 = m1 * ncwnum1

. scalar effper3 = m3 * ncwnum3

. display "The estimated effect on the number of deaths is " (effper3 - effper1)
The estimated effect on the number of deaths is -94630.158

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ====================================================================
. * SWITCHING REG: ESTIMATED EFFECT ON DEATHS OF URBAN CIVIC REPERTOIRE 
. *    IN EPISODES WITHOUT CIVIL WARS, 1985-2014 vs. 1900-1949 
. * ====================================================================
. * Full switching model
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat urbancivic if civilwar==0 & startyear>1899, s(mean) by(timeperiods) save

Summary for variables: urbancivic
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |   .016129
  1950-1984 |     .1875
  1985-2014 |        .6
------------+----------
      Total |  .3076923
-----------------------

. mat total1 = r(Stat1)

. mat total3 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
.01612903

. local newtot3 = total3[1,1]

. display `newtot3'
.6

. * Reassign var
. local lev1 = `newtot1'

. local lev3 = `newtot3'

. * Calculate marginal effects for success rates for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 3

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb0)+(0.5*(`param2')*(`param2'))))) at(urbancivic=(`lev1' `lev3')) subp
> op(if civilwar==0)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =        137
Model VCE    : OIM

Expression   : exp((predict(xb0)+(0.5*(2.292617459269031)*(2.292617459269031))))

1._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =     .016129
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

2._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =          .6
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    2179.67   567.4513     3.84   0.000     1067.486    3291.854
          2  |   816.3629   189.6862     4.30   0.000     444.5848    1188.141
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m3 = el(r(b),1,2)

. * Calculate effect: Multiply effect times number of non-civil-war episodes in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar ncwnum1 = tper[1,1]

. scalar ncwnum3 = tper[3,1]

. display ncwnum1
62

. display ncwnum3
75

. scalar effper1 = m1 * ncwnum1

. scalar effper3 = m3 * ncwnum3

. display "The estimated effect on the number of deaths is " (effper3 - effper1)
The estimated effect on the number of deaths is -73912.337

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ===================================================================
. * SWITCHING REG: ESTIMATED EFFECT ON DEATHS OF OPPOSITION SUCCESS IN 
. *    EPISODES WITHOUT CIVIL WARS, 1985-2014 vs. 1900-1949 
. * ===================================================================
. * Full switching model
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat success if civilwar==0 & startyear>1899, s(mean) by(timeperiods) save

Summary for variables: success
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  .3225806
  1950-1984 |    .46875
  1985-2014 |  .5333333
------------+----------
      Total |   .443787
-----------------------

. mat total1 = r(Stat1)

. mat total3 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
.32258065

. local newtot3 = total3[1,1]

. display `newtot3'
.53333333

. * Reassign var
. local lev1 = `newtot1'

. local lev3 = `newtot3'

. * Calculate marginal effects for success rates for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 3

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb0)+(0.5*(`param2')*(`param2'))))) at(success=(`lev1' `lev3')) subpop(
> if civilwar==0)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =        137
Model VCE    : OIM

Expression   : exp((predict(xb0)+(0.5*(2.292617459269031)*(2.292617459269031))))

1._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .3225806
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

2._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5333333
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   1633.091   368.1802     4.44   0.000     911.4714    2354.711
          2  |   1154.054    243.311     4.74   0.000     677.1736    1630.935
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m3 = el(r(b),1,2)

. * Calculate effect: Multiply effect times number of non-civil-war episodes in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar ncwnum1 = tper[1,1]

. scalar ncwnum3 = tper[3,1]

. display ncwnum1
62

. display ncwnum3
75

. scalar effper1 = m1 * ncwnum1

. scalar effper3 = m3 * ncwnum3

. display "The estimated effect on the number of deaths is " (effper3 - effper1)
The estimated effect on the number of deaths is -14697.589

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ==============================================================
. * SWITCHING REG: ESTIMATED EFFECT ON DEATHS OF POLITY SCORES IN 
. *    EPISODES WITHOUT CIVIL WARS, 1985-2014 vs. 1900-1949 
. * ==============================================================
. * Full switching model
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl) (lndeaths =  lnmonthsdu
> r urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) c
> opula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat newpolitymin1 if civilwar==0 & startyear>1899, s(mean) by(timeperiods) save

Summary for variables: newpolitymin1
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  .4833333
  1950-1984 |    -2.125
  1985-2014 | -1.930556
------------+----------
      Total | -1.085366
-----------------------

. mat total1 = r(Stat1)

. mat total3 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
.48333333

. local newtot3 = total3[1,1]

. display `newtot3'
-1.9305556

. * Reassign var
. local lev1 = `newtot1'

. local lev3 = `newtot3'

. * Calculate marginal effects for success rates for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 3

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb0)+(0.5*(`param2')*(`param2'))))) at(newpolitymin1=(`lev1' `lev3')) s
> ubpop(if civilwar==0)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =        137
Model VCE    : OIM

Expression   : exp((predict(xb0)+(0.5*(2.292617459269031)*(2.292617459269031))))

1._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =    .4833333
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

2._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.930556
               newgdppcthl     =    3.685198 (mean)
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   959.0136    213.831     4.48   0.000     539.9126    1378.115
          2  |   1224.707    258.256     4.74   0.000     718.5344    1730.879
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m3 = el(r(b),1,2)

. * Calculate effect: Multiply effect times number of non-civil-war episodes in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar ncwnum1 = tper[1,1]

. scalar ncwnum3 = tper[3,1]

. display ncwnum1
62

. display ncwnum3
75

. scalar effper1 = m1 * ncwnum1

. scalar effper3 = m3 * ncwnum3

. display "The estimated effect on the number of deaths is " (effper3 - effper1)
The estimated effect on the number of deaths is 32394.169

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * ============================================================
. * SWITCHING REG: ESTIMATED EFFECT ON DEATHS OF GDP PER CAPITA 
. *    IN EPISODES WITHOUT CIVIL WARS, 1985-2014 vs. 1900-1949 
. * ============================================================
. * Full switching model
. quietly: switchcopula (lndeaths = urbandum urbancivic success newpolitymin1 newgdppcthl ) (lndeaths =  lnmonthsd
> ur urbpercbefrev success) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder) copula0(clayton) 
> copula1(fgm) margin1(normal) margin0(normal) margsel(normal)

. tabstat newgdppcthl if civilwar==0 & startyear>1899, s(mean) by(timeperiods) save

Summary for variables: newgdppcthl
     by categories of: timeperiods (Time period)

timeperiods |      mean
------------+----------
  1900-1949 |  1.713955
  1950-1984 |    4.2564
  1985-2014 |  4.667942
------------+----------
      Total |  3.506306
-----------------------

. mat total1 = r(Stat1)

. mat total3 = r(Stat3)

. local newtot1 = total1[1,1]

. display `newtot1'
1.7139552

. local newtot3 = total3[1,1]

. display `newtot3'
4.6679418

. * Reassign var
. local lev1 = `newtot1'

. local lev3 = `newtot3'

. * Calculate marginal effects for success rates for each period
. * For checking the parameter to extract:  mat list e(b)
. local param1 = e(k) - 3

. matrix coefs = e(b)

. local param2 = exp(coefs[1,`param1'])

. margins, atmeans expression(exp((predict(xb0)+(0.5*(`param2')*(`param2'))))) at(newgdppcthl=(`lev1' `lev3')) sub
> pop(if civilwar==0)

Adjusted predictions                            Number of obs     =        230
                                                Subpop. no. obs   =        137
Model VCE    : OIM

Expression   : exp((predict(xb0)+(0.5*(2.292617459269031)*(2.292617459269031))))

1._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    1.713955
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

2._at        : urbandum        =    .9343066 (mean)
               leftist         =     .189781 (mean)
               ethnicorder     =     .080292 (mean)
               urbancivic      =    .3722628 (mean)
               success         =    .5109489 (mean)
               newpolitym~1    =   -1.708029 (mean)
               newgdppcthl     =    4.667942
               lnmonthsdur     =    1.308541 (mean)
               urbpercbef~v    =    27.57398 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   1870.162   464.2082     4.03   0.000      960.331    2779.994
          2  |   958.7492   207.9931     4.61   0.000     551.0903    1366.408
------------------------------------------------------------------------------

. * Calculate difference between marginal effects for each period
. scalar m1 = el(r(b),1,1)

. scalar m3 = el(r(b),1,2)

. * Calculate effect: Multiply effect times number of non-civil-war episodes in post-Cold War period
. tab timeperiods civilwar if startyear>1899, matcell(tper)

           |  Revolution involved
           | civil war? (sustained
      Time |   warfare > 2 mos)
    period |        no        yes |     Total
-----------+----------------------+----------
 1900-1949 |        62         60 |       122 
 1950-1984 |        32         66 |        98 
 1985-2014 |        75         48 |       123 
-----------+----------------------+----------
     Total |       169        174 |       343 


. scalar ncwnum1 = tper[1,1]

. scalar ncwnum3 = tper[3,1]

. display ncwnum1
62

. display ncwnum3
75

. scalar effper1 = m1 * ncwnum1

. scalar effper3 = m3 * ncwnum3

. display "The estimated effect on the number of deaths is " (effper3 - effper1)
The estimated effect on the number of deaths is -44043.883

. * Drop scalars and macros
. macro drop _all

. scalar drop _all

. 
. * =================================================================
. * SWITCHING REG: JACKKNIFE LEAVE-ONE-OUT CROSS-VALIDATION OF MODEL
. * =================================================================
. jacknife ,  cluster(revid): switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum) (lnd
> eaths =  lnmonthsdur success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnicorder)
>  copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(logit) iterate(75)
(running switchcopula on estimation sample)

Jackknife replications (230)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..............................

Swithching Regression: Copulas clayton-fgm, Margins logit-normal-normal

                                                Number of obs     =        230
                                                Replications      =        230
                                                F(   3,    229)   =      24.66
Log likelihood =  -570.2302                     Prob > F          =     0.0000

                                  (Replications based on 230 clusters in revid)
-------------------------------------------------------------------------------
              |              Jackknife
              |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |   -3.82011   .4940055    -7.73   0.000    -4.793487   -2.846733
      leftist |   1.003552   .5036403     1.99   0.047     .0111904    1.995913
  ethnicorder |    2.62833   .4916599     5.35   0.000     1.659574    3.597085
        _cons |   1.178061   .3989617     2.95   0.003     .3919556    1.964166
--------------+----------------------------------------------------------------
regime0       |
      success |    -1.6447   .4653799    -3.53   0.000    -2.561674   -.7277259
newpolitymin1 |  -.1012074   .0381874    -2.65   0.009     -.176451   -.0259638
   urbancivic |   -1.68422   .4641809    -3.63   0.000    -2.598831   -.7696083
  newgdppcthl |  -.2236339   .0558214    -4.01   0.000    -.3336232   -.1136446
     urbandum |  -4.637518   .9024697    -5.14   0.000    -6.415723   -2.859312
        _cons |   10.90671   .9209882    11.84   0.000     9.092016     12.7214
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766183   .1457852     3.96   0.000     .2893665    .8638701
      success |   1.175376   .4059074     2.90   0.004      .375585    1.975167
urbpercbefrev |  -.0292104   .0132947    -2.20   0.029     -.055406   -.0030149
        _cons |   7.818941    .671413    11.65   0.000     6.496004    9.141878
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8285651   .0530264    15.63   0.000      .724083    .9330471
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6026859   .0795671     7.57   0.000     .4459087    .7594631
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.0271295   .4320258    -0.06   0.950    -.8783833    .8241244
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.758056   23.68519     0.29   0.776    -39.91071    53.42682
--------------+----------------------------------------------------------------
       sigma0 |    2.29003   .1214321                      2.062839    2.542244
       sigma1 |   1.827019   .1453706                      1.561909    2.137128
       theta0 |   .9732352   .4204627                       .415454    2.279884
       theta1 |   .9999973   .0001278                            -1           1
         tau0 |  -.3273321   .0951259                     -.5326976   -.1719983
         tau1 |  -.2222216   .0000284                     -.2222222    .2222222
-------------------------------------------------------------------------------
Wald test of independence :      Test statistic        . with p-value       .
------------------------------------------------------------------------------

. 
. * =============================================
. * SWITCHING REG: BOOTSTRAP VALIDATION OF MODEL
. * =============================================
. bootstrap , reps(200) seed(1234): switchcopula (lndeaths = success newpolitymin1 urbancivic newgdppcthl urbandum
> ) (lndeaths =  lnmonthsdur success urbpercbefrev) if startyear>1899, select (civilwar =  urbandum leftist ethnic
> order) copula0(clayton) copula1(fgm) margin1(normal) margin0(normal) margsel(logit) iterate(75)
(running switchcopula on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....x...........x.................................    50
.............x...............................x....   100
...x....x......x............................x.....   150
................................x.................   200

Swithching Regression: Copulas clayton-fgm, Margins logit-normal-normal

                                                Number of obs     =        230
                                                Replications      =        191
                                                Wald chi2(3)      =      65.35
Log likelihood =  -570.2302                     Prob > chi2       =     0.0000

-------------------------------------------------------------------------------
              |   Observed   Bootstrap                         Normal-based
              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
select        |
     urbandum |   -3.82011   .5380537    -7.10   0.000    -4.874676   -2.765544
      leftist |   1.003552   .5706091     1.76   0.079    -.1148217    2.121925
  ethnicorder |    2.62833   .5430177     4.84   0.000     1.564034    3.692625
        _cons |   1.178061   .3947984     2.98   0.003       .40427    1.951851
--------------+----------------------------------------------------------------
regime0       |
      success |    -1.6447   .4583094    -3.59   0.000     -2.54297   -.7464299
newpolitymin1 |  -.1012074   .0370137    -2.73   0.006    -.1737529   -.0286618
   urbancivic |   -1.68422   .5297753    -3.18   0.001     -2.72256   -.6458794
  newgdppcthl |  -.2236339   .1063523    -2.10   0.035    -.4320806   -.0151872
     urbandum |  -4.637518    1.78013    -2.61   0.009    -8.126508   -1.148527
        _cons |   10.90671   1.696793     6.43   0.000     7.581058    14.23236
--------------+----------------------------------------------------------------
regime1       |
  lnmonthsdur |   .5766183     .14811     3.89   0.000     .2863281    .8669086
      success |   1.175376   .3954911     2.97   0.003     .4002274    1.950524
urbpercbefrev |  -.0292104   .0143809    -2.03   0.042    -.0573966   -.0010243
        _cons |   7.818941   .7015371    11.15   0.000     6.443954    9.193928
--------------+----------------------------------------------------------------
lnsigma0      |
        _cons |   .8285651   .0835959     9.91   0.000     .6647201    .9924101
--------------+----------------------------------------------------------------
lnsigma1      |
        _cons |   .6026859   .0864045     6.98   0.000     .4333361    .7720357
--------------+----------------------------------------------------------------
atheta0       |
        _cons |  -.0271295   18.32221    -0.00   0.999      -35.938    35.88374
--------------+----------------------------------------------------------------
atheta1       |
        _cons |   6.758056   65.74118     0.10   0.918    -122.0923    135.6084
--------------+----------------------------------------------------------------
       sigma0 |    2.29003   .1914372                      1.943946    2.697728
       sigma1 |   1.827019   .1578628                      1.542395    2.164167
       theta0 |   .9732352   17.83182                      2.47e-16    3.84e+15
       theta1 |   .9999973   .0003548                            -1           1
         tau0 |  -.3273321    4.03429                            -1   -1.23e-16
         tau1 |  -.2222216   .0000788                     -.2222222    .2222222
-------------------------------------------------------------------------------
Wald test of independence :      Test statistic  1.0e+05 with p-value  0.0000
------------------------------------------------------------------------------

. 
. 
. log close
      name:  <unnamed>
       log:  C:\Users\mbeissin\Desktop\Stata files for book\Logfiles\chapter8.log
  log type:  text
 closed on:  25 Jan 2022, 22:23:31
------------------------------------------------------------------------------------------------------------------
